mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-12 22:47:12 +03:00
Fix type check for warning duplicate
This commit is contained in:
@@ -43,7 +43,7 @@ export async function postWarning(req: Request, res: Response): Promise<Response
|
||||
let resultStatus = "";
|
||||
|
||||
if (enabled) {
|
||||
const previousWarning = await db.prepare("get", 'SELECT * FROM "warnings" WHERE "userID" = ? AND "issuerUserID" = ?', [userID, issuerUserID]) as warningEntry;
|
||||
const previousWarning = await db.prepare("get", 'SELECT * FROM "warnings" WHERE "userID" = ? AND "issuerUserID" = ? AND "type" = ?', [userID, issuerUserID, type]) as warningEntry;
|
||||
|
||||
if (!previousWarning) {
|
||||
await db.prepare(
|
||||
|
||||
Reference in New Issue
Block a user