aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRan Guin <[email protected]>2021-05-15 12:15:18 -0700
committerAdam Soltys <[email protected]>2021-06-09 16:05:31 -0700
commit67f4859163f4601ab13da4d93d9b0f5a6a6c040b (patch)
tree57befd1b5c9086f051ce6c23cc481da70cc8617a
parentac9572909ccf0f8725020446723342d5a3bcbce5 (diff)
downloadcoinos-server-67f4859163f4601ab13da4d93d9b0f5a6a6c040b.tar.gz
coinos-server-67f4859163f4601ab13da4d93d9b0f5a6a6c040b.zip
change grant referral to post
-rw-r--r--routes/referrals.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/referrals.js b/routes/referrals.js
index f265573b..ebd9edd3 100644
--- a/routes/referrals.js
+++ b/routes/referrals.js
@@ -17,10 +17,10 @@ router.get('/', function(req, res, next) {
// Changes to DB:
// adds record to referrals table:
// { token: <uuid>, sponsor_id: <user.id>, status: "pending" }
-router.get(
+router.post(
"/grant",
ah(async (req, res) => {
- const {sponsor_id, expiry} = req.query
+ const {sponsor_id, expiry} = req.body
var token = uuidv4()
debug('generated token: ' + token + ' sponsored by ' + sponsor_id)