Skip to content

Commit

Permalink
fix: modified universal link path
Browse files Browse the repository at this point in the history
  • Loading branch information
qinluhe committed Dec 30, 2024
1 parent b1147bd commit 82b475c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 42 deletions.
46 changes: 22 additions & 24 deletions app/.well-known/apple-app-site-association/route.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@

import { NextResponse } from 'next/server';

const body = {
"applinks": {
"apps": [],
"details": [
applinks: {
apps: [],
details: [
{
"appIDs": [
"VHB67HRSZG.com.appflowy.appflowy.flutter"
],
"paths": [
"*"
],
"components": [
appIDs: ['VHB67HRSZG.com.appflowy.appflowy.flutter'],
paths: ['/download', '/download/*'],
components: [
{
'/': '/download',
comment: 'Matches any URL whose path starts with /download',
},
{
"/": "/*"
}
]
}
]
'/': '/download/*',
comment: 'Matches any URL whose path starts with /download/',
},
],
},
],
},
"webcredentials": {
"apps": [
"VHB67HRSZG.com.appflowy.appflowy.flutter"
]
}
}
webcredentials: {
apps: ['VHB67HRSZG.com.appflowy.appflowy.flutter'],
},
};

export async function GET() {
return new NextResponse(JSON.stringify(body),
{
return new NextResponse(JSON.stringify(body), {
headers: {
'Content-Type': 'application/json',
},
Expand Down
33 changes: 15 additions & 18 deletions app/.well-known/assetlinks.json/route.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@

import { NextResponse } from 'next/server';

const body = [
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"namespace": "android_app",
"package_name": "io.appflowy.appflowy",
"sha256_cert_fingerprints": [
"19:13:85:33:DB:B3:A2:FD:65:2F:61:D7:F2:35:95:79:FE:6E:CC:B5:AC:94:AA:02:9E:BE:E7:0E:02:6B:45:FF"
]
}
}
relation: ['delegate_permission/common.handle_all_urls'],
target: {
namespace: 'android_app',
package_name: 'io.appflowy.appflowy',
sha256_cert_fingerprints: [
'19:13:85:33:DB:B3:A2:FD:65:2F:61:D7:F2:35:95:79:FE:6E:CC:B5:AC:94:AA:02:9E:BE:E7:0E:02:6B:45:FF',
],
path_prefix: '/download',
},
},
];

export async function GET() {
return new NextResponse(JSON.stringify(body),
{
headers: {
'Content-Type': 'application/json',
},
});
return new NextResponse(JSON.stringify(body), {
headers: {
'Content-Type': 'application/json',
},
});
}

0 comments on commit 82b475c

Please sign in to comment.