Stronger types for unix timestamps

This commit is contained in:
baldo 2022-07-18 12:55:19 +02:00
parent 217ed6ff20
commit c627e702ce
4 changed files with 22 additions and 9 deletions
server/services

View file

@ -76,10 +76,9 @@ async function removePendingMailFromQueue(id: MailId): Promise<void> {
}
async function incrementFailureCounterForPendingEmail(id: MailId): Promise<void> {
const now = moment();
await db.run(
'UPDATE email_queue SET failures = failures + 1, modified_at = ? WHERE id = ?',
[now.unix(), id],
[moment().unix(), id],
);
}