add disableTime column to the warnings table

This commit is contained in:
mini-bomba
2025-09-10 22:50:43 +02:00
parent 3e74a0da58
commit b09e552d1d
3 changed files with 66 additions and 6 deletions

View File

@@ -61,7 +61,7 @@ export async function postWarning(req: Request, res: Response): Promise<Response
return res.sendStatus(409);
}
} else {
await db.prepare("run", 'UPDATE "warnings" SET "enabled" = 0 WHERE "userID" = ? AND "type" = ?', [userID, type]);
await db.prepare("run", 'UPDATE "warnings" SET "enabled" = 0, "disableTime" = ? WHERE "userID" = ? AND "type" = ? AND "enabled" = 1', [issueTime, userID, type]);
resultStatus = "removed from";
}