mirror of
https://github.com/wukko/cobalt.git
synced 2025-05-13 12:07:05 +02:00
security/api-keys: clarify error when number is not positive
This commit is contained in:
parent
81818f8741
commit
3d7713a942
@ -51,7 +51,7 @@ const validateKeys = (input) => {
|
|||||||
if (typeof details.limit !== 'number')
|
if (typeof details.limit !== 'number')
|
||||||
throw "detail object contains invalid limit (not a number)";
|
throw "detail object contains invalid limit (not a number)";
|
||||||
else if (details.limit < 1)
|
else if (details.limit < 1)
|
||||||
throw "detail object contains invalid limit (not a number)";
|
throw "detail object contains invalid limit (not a positive number)";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (details.ips) {
|
if (details.ips) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user