mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-30 11:28:19 +03:00
style fixes
This commit is contained in:
@@ -20,9 +20,7 @@ async function getSegmentsByUUID(UUIDs: SegmentUUID[]): Promise<DBSegment[]> {
|
|||||||
const DBSegments: DBSegment[] = [];
|
const DBSegments: DBSegment[] = [];
|
||||||
for (let UUID of UUIDs) {
|
for (let UUID of UUIDs) {
|
||||||
// if UUID is invalid, skip
|
// if UUID is invalid, skip
|
||||||
if (!isValidSegmentUUID(UUID)) {
|
if (!isValidSegmentUUID(UUID)) continue;
|
||||||
continue;
|
|
||||||
}
|
|
||||||
DBSegments.push(await getSegmentFromDBByUUID(UUID as SegmentUUID));
|
DBSegments.push(await getSegmentFromDBByUUID(UUID as SegmentUUID));
|
||||||
}
|
}
|
||||||
return DBSegments;
|
return DBSegments;
|
||||||
@@ -45,7 +43,7 @@ async function handleGetSegmentInfo(req: Request, res: Response) {
|
|||||||
}
|
}
|
||||||
const DBSegments = await getSegmentsByUUID(UUIDs);
|
const DBSegments = await getSegmentsByUUID(UUIDs);
|
||||||
// all uuids failed lookup
|
// all uuids failed lookup
|
||||||
if (DBSegments.length === 0) {
|
if (!DBSegments?.length) {
|
||||||
res.sendStatus(400);
|
res.sendStatus(400);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user