Set correct default ghost expiration

This commit is contained in:
Johannes Zellner
2021-09-17 16:08:03 +02:00
parent 2ea5786fcc
commit b3fe2a4b84

View File

@@ -250,7 +250,7 @@ async function setGhost(user, password, expiresAt) {
assert.strictEqual(typeof password, 'string');
assert.strictEqual(typeof expiresAt, 'number');
expiresAt = expiresAt || DEFAULT_GHOST_LIFETIME;
expiresAt = expiresAt || (Date.now() + DEFAULT_GHOST_LIFETIME);
debug(`setGhost: ${user.username} expiresAt ${expiresAt}`);