expiresInSeconds now forced to be an integer

This commit is contained in:
Konstantin Wohlwend 2024-12-01 00:38:00 -08:00
parent f7d4b67155
commit c7d3bcf4fb

View File

@ -48,7 +48,7 @@ function createAdapter(options: {
}
async upsert(id: string, payload: AdapterPayload, expiresInSeconds: number): Promise<void> {
await niceUpdate(this.model, id, () => ({ payload, expiresAt: new Date(Date.now() + (expiresInSeconds ?? 0) * 1000) }));
await niceUpdate(this.model, id, () => ({ payload, expiresAt: new Date(Date.now() + (+expiresInSeconds ?? 0) * 1000) }));
}
async find(id: string): Promise<AdapterPayload | undefined> {