mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-30 19:38:28 +03:00
Add semicolons
This commit is contained in:
committed by
GitHub
parent
7fe787c5ab
commit
20ae560bb1
@@ -10,9 +10,9 @@ async function getSegmentFromDBByUUID(UUID: SegmentUUID): Promise<DBSegment> {
|
|||||||
`SELECT "videoID", "startTime", "endTime", "votes", "locked",
|
`SELECT "videoID", "startTime", "endTime", "votes", "locked",
|
||||||
"UUID", "userID", "timeSubmitted", "views", "category",
|
"UUID", "userID", "timeSubmitted", "views", "category",
|
||||||
"service", "videoDuration", "hidden", "reputation", "shadowHidden" FROM "sponsorTimes"
|
"service", "videoDuration", "hidden", "reputation", "shadowHidden" FROM "sponsorTimes"
|
||||||
WHERE "UUID" = ?`, [UUID])
|
WHERE "UUID" = ?`, [UUID]);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return null
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ async function getSegmentsByUUID(UUIDs: SegmentUUID[]): Promise<DBSegment[]> {
|
|||||||
}
|
}
|
||||||
DBSegments.push(await getSegmentFromDBByUUID(UUID as SegmentUUID));
|
DBSegments.push(await getSegmentFromDBByUUID(UUID as SegmentUUID));
|
||||||
}
|
}
|
||||||
return DBSegments
|
return DBSegments;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleGetSegmentInfo(req: Request, res: Response) {
|
async function handleGetSegmentInfo(req: Request, res: Response) {
|
||||||
@@ -34,7 +34,7 @@ async function handleGetSegmentInfo(req: Request, res: Response) {
|
|||||||
? JSON.parse(req.query.UUIDs as string)
|
? JSON.parse(req.query.UUIDs as string)
|
||||||
: req.query.UUID
|
: req.query.UUID
|
||||||
? [req.query.UUID]
|
? [req.query.UUID]
|
||||||
: null
|
: null;
|
||||||
// deduplicate with set
|
// deduplicate with set
|
||||||
UUIDs = [ ...new Set(UUIDs)];
|
UUIDs = [ ...new Set(UUIDs)];
|
||||||
// if more than 10 entries, slice
|
// if more than 10 entries, slice
|
||||||
|
|||||||
Reference in New Issue
Block a user