refactor(general): use Date.now() instead of creating a new Date instance (#13671)

This commit is contained in:
zyoshoka 2024-04-07 21:14:13 +09:00 committed by GitHub
parent 2f8fb105a5
commit 959cc8ff37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 13 additions and 13 deletions

View file

@ -75,7 +75,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const checkMoving = await this.accountMoveService.validateAlsoKnownAs(
me,
(old, src) => !!src.movedAt && src.movedAt.getTime() + 1000 * 60 * 60 * 2 > (new Date()).getTime(),
(old, src) => !!src.movedAt && src.movedAt.getTime() + 1000 * 60 * 60 * 2 > Date.now(),
true,
);
if (checkMoving ? file.size > 32 * 1024 * 1024 : file.size > 64 * 1024) throw new ApiError(meta.errors.tooBigFile);