Fix: reset onetimelink expiration instead of failing (#2370)

* update expiresAt instead of failing

* add changelog
This commit is contained in:
Bernd Storath
2025-12-29 19:12:53 +01:00
committed by GitHub
parent 94b33abf5e
commit 261da431e7
2 changed files with 7 additions and 0 deletions
@@ -16,6 +16,12 @@ function createPreparedStatement(db: DBType) {
oneTimeLink: sql.placeholder('oneTimeLink'),
expiresAt: sql.placeholder('expiresAt'),
})
.onConflictDoUpdate({
target: oneTimeLink.id,
set: {
expiresAt: sql.placeholder('expiresAt') as never as string,
},
})
.prepare(),
erase: db
.update(oneTimeLink)