actually use rate-limit status

This commit is contained in:
wukko 2023-08-14 01:51:55 +06:00
parent c4830cac08
commit f4b486a236

View file

@ -27,7 +27,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
keyGenerator: (req, res) => sha256(getIP(req), ipSalt),
handler: (req, res, next, opt) => {
return res.status(429).json({
"status": "error",
"status": "rate-limit",
"text": loc(languageCode(req), 'ErrorRateLimit')
});
}
@ -40,7 +40,7 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
keyGenerator: (req, res) => sha256(getIP(req), ipSalt),
handler: (req, res, next, opt) => {
return res.status(429).json({
"status": "error",
"status": "rate-limit",
"text": loc(languageCode(req), 'ErrorRateLimit')
});
}