Browse Source

update expiresAt instead of failing

pull/2370/head
Bernd Storath 7 months ago
parent
commit
d3ae208372
No known key found for this signature in database GPG Key ID: D6C85685A555540F
  1. 6
      src/server/database/repositories/oneTimeLink/service.ts

6
src/server/database/repositories/oneTimeLink/service.ts

@ -16,6 +16,12 @@ function createPreparedStatement(db: DBType) {
oneTimeLink: sql.placeholder('oneTimeLink'), oneTimeLink: sql.placeholder('oneTimeLink'),
expiresAt: sql.placeholder('expiresAt'), expiresAt: sql.placeholder('expiresAt'),
}) })
.onConflictDoUpdate({
target: oneTimeLink.id,
set: {
expiresAt: sql.placeholder('expiresAt') as never as string,
},
})
.prepare(), .prepare(),
erase: db erase: db
.update(oneTimeLink) .update(oneTimeLink)

Loading…
Cancel
Save