mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Fix warnings
This commit is contained in:
parent
1678dcac82
commit
94b82b6865
2 changed files with 15 additions and 15 deletions
|
@ -19,15 +19,15 @@ export class Mysql implements IDatabase {
|
|||
const queryResult = this.connection.query(query, params);
|
||||
|
||||
switch (type) {
|
||||
case "get": {
|
||||
return queryResult[0];
|
||||
}
|
||||
case "all": {
|
||||
return queryResult;
|
||||
}
|
||||
case "run": {
|
||||
break;
|
||||
}
|
||||
case "get": {
|
||||
return queryResult[0];
|
||||
}
|
||||
case "all": {
|
||||
return queryResult;
|
||||
}
|
||||
case "run": {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,12 +83,12 @@ export async function postSegmentShift(req: Request, res: Response): Promise<Res
|
|||
for (const segment of segments) {
|
||||
const result = shiftSegment(segment, shift);
|
||||
switch (result.action) {
|
||||
case ACTION_UPDATE:
|
||||
await db.prepare("run", 'UPDATE "sponsorTimes" SET "startTime" = ?, "endTime" = ? WHERE "UUID" = ?', [result.segment.startTime, result.segment.endTime, result.segment.UUID]);
|
||||
break;
|
||||
case ACTION_REMOVE:
|
||||
await db.prepare("run", 'UPDATE "sponsorTimes" SET "startTime" = ?, "endTime" = ?, "votes" = -2 WHERE "UUID" = ?', [result.segment.startTime, result.segment.endTime, result.segment.UUID]);
|
||||
break;
|
||||
case ACTION_UPDATE:
|
||||
await db.prepare("run", 'UPDATE "sponsorTimes" SET "startTime" = ?, "endTime" = ? WHERE "UUID" = ?', [result.segment.startTime, result.segment.endTime, result.segment.UUID]);
|
||||
break;
|
||||
case ACTION_REMOVE:
|
||||
await db.prepare("run", 'UPDATE "sponsorTimes" SET "startTime" = ?, "endTime" = ?, "votes" = -2 WHERE "UUID" = ?', [result.segment.startTime, result.segment.endTime, result.segment.UUID]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
|
|
Loading…
Reference in a new issue