Don't remove all warnings

This commit is contained in:
Ajay Ramachandran
2020-12-29 13:27:54 -05:00
parent 78ef129634
commit baa4e73ba5

View File

@@ -25,7 +25,7 @@ export function postWarning(req: Request, res: Response) {
db.prepare('run', 'INSERT INTO warnings (userID, issueTime, issuerUserID, enabled) VALUES (?, ?, ?, 1)', [userID, issueTime, issuerUserID]);
resultStatus = "issued to";
} else {
db.prepare('run', 'UPDATE warnings SET enabled = 0', []);
db.prepare('run', 'UPDATE warnings SET enabled = 0 WHERE userID = ? AND issuerUserID = ?', [userID, issuerUserID]);
resultStatus = "removed from";
}