Skip to content

Commit f3a9abb

Browse files
committed
Clean up some lines in server
1 parent 27648df commit f3a9abb

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/server.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function createApp(siteId: string, branchOrRef: string) {
8181
}
8282

8383
const manifest = await getManifest(requestSiteId, requestBranchOrRef);
84-
if (!manifest) {
84+
if (!manifest || !manifest.paths) {
8585
res
8686
.status(404)
8787
.sendFile(
@@ -91,16 +91,8 @@ export function createApp(siteId: string, branchOrRef: string) {
9191
}
9292

9393
const manifestPaths = manifest.paths;
94-
if (!manifestPaths) {
95-
res
96-
.status(404)
97-
.sendFile(
98-
fsPath.join(__dirname, './static/', 'fileset-does-not-exist.html')
99-
);
100-
return;
101-
}
10294
const blobKey = manifestPaths[blobPath];
103-
const updatedUrl = `/wing-prod.appspot.com/fileset/sites/${requestSiteId}/blobs/${blobKey}`;
95+
const updatedUrl = `/${process.env.GCLOUD_PROJECT}.appspot.com/fileset/sites/${requestSiteId}/blobs/${blobKey}`;
10496

10597
// TODO: Add custom 404 support based on site config.
10698
if (!blobKey) {

0 commit comments

Comments
 (0)