mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Only adding info on where to get api-token if not authorized with an api-token
This commit is contained in:
@@ -63,7 +63,7 @@ var error = {
|
|||||||
},
|
},
|
||||||
tooMany: {
|
tooMany: {
|
||||||
status: 429,
|
status: 429,
|
||||||
error: "You're doing too many requests, check header-field Retry-After for the wait-time left. To get an API-key, visit https://zoff.me/api/apply",
|
error: "You're doing too many requests, check header-field Retry-After for the wait-time left.",
|
||||||
success: false,
|
success: false,
|
||||||
results: [],
|
results: [],
|
||||||
},
|
},
|
||||||
@@ -1405,6 +1405,7 @@ function checkTimeout(guid, res, authorized, type, callback) {
|
|||||||
var retry_in = (date.getTime() - now.getTime()) / 1000;
|
var retry_in = (date.getTime() - now.getTime()) / 1000;
|
||||||
if(retry_in > 0) {
|
if(retry_in > 0) {
|
||||||
res.header({'Retry-After': retry_in});
|
res.header({'Retry-After': retry_in});
|
||||||
|
error.tooMany.error += " To get an API-key, visit https://zoff.me/api/apply.";
|
||||||
res.status(429).send(error.tooMany);
|
res.status(429).send(error.tooMany);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user