Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temp/getfollowrequests POST is now temp/followrequests GET #201

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions routes/Temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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',
Expand All @@ -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))
})
});
Expand Down
Loading