Skip to content

Commit b40de8a

Browse files
committed
oops
1 parent c904901 commit b40de8a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"build": "webpack",
88
"dev": "wrangler dev",
99
"preview": "wrangler preview",
10-
"deploy": "wrangler publish"
10+
"deploy": "wrangler publish",
11+
"prod": "wrangler publish"
1112
},
1213
"dependencies": {
1314
"tiny-request-router": "^1.2.2"

src/routes/page.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ export async function pageRoute(req: HandlerRequest) {
88
const pageId = parsePageId(req.params.pageId);
99
const page = await fetchPageById(pageId!, req.notionToken);
1010

11-
if (!pageId || !page.recordMap)
11+
console.log('what?', req.params.pageId, page.recordMap)
12+
13+
14+
if (!req.params.pageId) {
1215
console.error(`Page not found at [ID:${req.params.pageId}]`)
1316
return createResponse(
1417
JSON.stringify({ error: "No page found on Notion at: " + pageId }),
1518
{},
1619
401
1720
);
21+
}
1822

1923

2024
const baseBlocks = page.recordMap.block;

0 commit comments

Comments
 (0)