Skip to content

Commit 79889fb

Browse files
author
Alan Shaw
committed
fix: use Authorization header
1 parent 1daad10 commit 79889fb

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

packages/api/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
"type": "module",
77
"main": "dist/worker.js",
88
"scripts": {
9-
"lt": "npm run lt:cluster & npm run lt:ipfs-proxy",
9+
"lt": "npm run lt:cluster & npm run lt:ipfs-proxy & npm run lt:postgrest",
1010
"lt:cluster": "npx localtunnel --port 9094 --subdomain \"$(whoami)-cluster-api-nft-storage\"",
1111
"lt:ipfs-proxy": "npx localtunnel --port 9095 --subdomain \"$(whoami)-ipfs-proxy-api-nft-storage\"",
12+
"lt:postgrest": "npx localtunnel --port 3000 --subdomain \"$(whoami)-postgrest-nft-storage\"",
1213
"deploy": "wrangler publish --env production",
1314
"dev": "wrangler dev",
1415
"test": "tsc && playwright-test \"test/**/*.spec.js\" --sw src/index.js",

packages/api/src/utils/db-client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class DBClient {
1414
constructor(url, token) {
1515
this.client = new PostgrestClient(url, {
1616
headers: {
17-
apikey: token,
17+
Authorization: `Bearer ${token}`,
1818
},
1919
})
2020
}

packages/api/wrangler.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ DEBUG = "*"
138138
CLUSTER_API_URL = "https://alan-cluster-api-nft-storage.loca.lt"
139139
CLUSTER_IPFS_PROXY_API_URL = "https://alan-ipfs-proxy-api-nft-storage.loca.lt/api/v0/"
140140
CLUSTER_ADDRS = ""
141-
DATABASE_URL = "http://localhost:8000"
141+
DATABASE_URL = "https://alan-postgrest-nft-storage.loca.lt"
142142

143143
[env.gozala]
144144
name="nft-storage-gozala"

0 commit comments

Comments
 (0)