getTime() instead of getDate()

This commit is contained in:
Milan Steiner 2022-02-16 15:18:18 +01:00
parent 5f0678764b
commit be22507caf

View File

@ -67,7 +67,7 @@ export class Webserver {
const entry = this.addressCounter.get(address); const entry = this.addressCounter.get(address);
if (entry !== undefined) { if (entry !== undefined) {
if (entry.getDate() + 24 * 3600 > Date.now()) { if (entry.getTime() + 24 * 3600 > Date.now()) {
throw new HttpError( throw new HttpError(
405, 405,
"Too many request from the same address. Blocked to prevent draining. Please wait 24h and try it again!", "Too many request from the same address. Blocked to prevent draining. Please wait 24h and try it again!",