Skip to content

Commit ec1d727

Browse files
Merge pull request #1258 from thedudedies21/registration_tokens
Added in date wrap on `/api/auth/generate-registration-tokens`
2 parents dcd2c89 + dda930d commit ec1d727

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/api/routes/auth/generate-registration-tokens.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ router.get(
5252
for (let i = 0; i < count; i++) {
5353
const token = ValidRegistrationToken.create({
5454
token: random(length),
55-
expires_at:
55+
expires_at: new Date(
5656
Date.now() +
57-
Config.get().security.defaultRegistrationTokenExpiration,
57+
Config.get().security
58+
.defaultRegistrationTokenExpiration,
59+
),
5860
});
5961
tokens.push(token);
6062
}

0 commit comments

Comments
 (0)