From c2be9376a455735115f7af724c05128d0bd7c1b4 Mon Sep 17 00:00:00 2001 From: Sebastian Webster Date: Sat, 14 Oct 2023 01:37:07 +1300 Subject: [PATCH] temp/getfollowrequests POST is now temp/followrequests GET --- routes/Temp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/Temp.js b/routes/Temp.js index d26c99d7..92680ab0 100644 --- a/routes/Temp.js +++ b/routes/Temp.js @@ -576,7 +576,7 @@ const rateLimiters = { skipFailedRequests: true, keyGenerator: (req, res) => req.tokenData //Use req.tokenData (account _id in MongoDB) to identify clients and rate limit }), - '/getfollowrequests': rateLimit({ + '/followrequests': rateLimit({ windowMs: 1000 * 60, //1 minute max: 20, standardHeaders: false, @@ -1985,7 +1985,7 @@ router.post('/makeaccountpublic', rateLimiters['/makeaccountpublic'], (req, res) }) }); -router.post('/getfollowrequests', rateLimiters['/getfollowrequests'], (req, res) => { +router.get('/followrequests', rateLimiters['/followrequests'], (req, res) => { const worker = new Worker(workerPath, { workerData: { functionName: 'getfollowrequests', @@ -1998,7 +1998,7 @@ router.post('/getfollowrequests', rateLimiters['/getfollowrequests'], (req, res) }) worker.on('error', (error) => { - console.error('An error occurred from TempWorker for POST /getfollowrequests:', error) + console.error('An error occurred from TempWorker for POST /followrequests:', error) HTTPHandler.serverError(res, String(error)) }) });