aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-09-20 16:39:33 -0700
committerAdam Soltys <[email protected]>2023-09-20 16:39:33 -0700
commitccbf0cbaaf414d638fd9034b0c5eb5037beaac30 (patch)
tree251c7d31dcf513ec0786dd80ec39d749c3b87d4d
parent948efb0f123532c9f276831b485a9769cbe6b413 (diff)
downloadcoinos-server-ccbf0cbaaf414d638fd9034b0c5eb5037beaac30.tar.gz
coinos-server-ccbf0cbaaf414d638fd9034b0c5eb5037beaac30.zip
whitelist token
-rw-r--r--index.js2
-rw-r--r--lib/whitelist.js3
-rw-r--r--routes/shopify.js3
3 files changed, 4 insertions, 4 deletions
diff --git a/index.js b/index.js
index 673e52b5..ca63ee6c 100644
--- a/index.js
+++ b/index.js
@@ -95,7 +95,7 @@ app.post("/requests", auth, requests.create);
app.post("/requests/delete", auth, requests.destroy);
app.post("/proxy", payments.proxy);
-app.post("/shopify/:username/:id", shopify);
+app.post("/shopify//:id", shopify);
let host = process.env.HOST || "0.0.0.0";
let port = process.env.PORT || 3119;
diff --git a/lib/whitelist.js b/lib/whitelist.js
index 379c3fdc..8609c8b3 100644
--- a/lib/whitelist.js
+++ b/lib/whitelist.js
@@ -30,6 +30,5 @@ export default [
"username",
"verified",
"shopifyStore",
- "shopifyPubkey",
- "shopifySecret"
+ "shopifyToken",
];
diff --git a/routes/shopify.js b/routes/shopify.js
index a0aab057..9cbbb02b 100644
--- a/routes/shopify.js
+++ b/routes/shopify.js
@@ -12,7 +12,8 @@ let query = `mutation orderMarkAsPaid($input: OrderMarkAsPaidInput!) {
}`;
export default async ({ body, params: { id, username } }, res) => {
- let user = await g(`user:${await g(`user:${username}`)}`);
+ let { uid } = body;
+ let user = await g(`user:${uid}`);
let r = await got
.post(