mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-16 16:37:12 +03:00
Allow updating warning messages
This commit is contained in:
@@ -52,8 +52,8 @@ export async function postWarning(req: Request, res: Response): Promise<Response
|
|||||||
// check if warning is still within issue time and warning is not enabled
|
// check if warning is still within issue time and warning is not enabled
|
||||||
} else if (checkExpiredWarning(previousWarning) ) {
|
} else if (checkExpiredWarning(previousWarning) ) {
|
||||||
await db.prepare(
|
await db.prepare(
|
||||||
"run", 'UPDATE "warnings" SET "enabled" = 1 WHERE "userID" = ? AND "issueTime" = ?',
|
"run", 'UPDATE "warnings" SET "enabled" = 1, "reason" = ? WHERE "userID" = ? AND "issueTime" = ?',
|
||||||
[userID, previousWarning.issueTime]
|
[reason, userID, previousWarning.issueTime]
|
||||||
);
|
);
|
||||||
resultStatus = "re-enabled";
|
resultStatus = "re-enabled";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user