Skip to content

Commit

Permalink
Fix minutely rate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
builder-247 authored and ChristianDobbie committed Jan 10, 2022
1 parent 9d72754 commit 7fb3ed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion svc/web.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ app.use((request, response, callback) => {
response.set('X-Rate-Limit-Remaining-Month', config.API_FREE_LIMIT - Number(data[2][1]));
}
logger.debug(`rate limit increment ${data}`);
if (data[0] > rateLimit && config.NODE_ENV !== 'test') {
if (data[0][1] > rateLimit && config.NODE_ENV !== 'test') {
return response.status(429).json({
error: 'rate limit exceeded',
});
Expand Down

0 comments on commit 7fb3ed3

Please sign in to comment.