Skip to content

Commit 3db868d

Browse files
committed
fix: pushing a secret for a new worker fails
1 parent 23c4df2 commit 3db868d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/lib/notion.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
const secret = globalThis.TOKEN_V2
2+
13
const _BASEURL = 'https://www.notion.so/api/v3'
24
const _HEADERS = {
3-
Cookie: `token_v2=${typeof TOKEN_V2 !== undefined ? TOKEN_V2 : ''};`,
5+
Cookie: `token_v2=${typeof secret !== undefined ? secret : ''};`,
46
'Content-Type': 'application/json',
57
}
68

wrangler.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ workers_dev = true
66
route = ""
77
zone_id = ""
88
compatibility_date = "2022-04-29"
9-
# [secrets]
10-
# TOKEN_V2
11-
# SLACK_WEBHOOK
12-
# DISCORD_WEBHOOK
13-
# EXPORT_TYPE
14-
# LOCALE
15-
# TIMEZONE
9+
#[secrets]
10+
#TOKEN_V2
11+
#SLACK_WEBHOOK
12+
#DISCORD_WEBHOOK
13+
#EXPORTTYPE
14+
#LOCALE
15+
#TIMEZONE

0 commit comments

Comments
 (0)