mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
style fixes
This commit is contained in:
parent
c92e44bb1d
commit
4963f4dc08
1 changed files with 2 additions and 4 deletions
|
@ -20,9 +20,7 @@ async function getSegmentsByUUID(UUIDs: SegmentUUID[]): Promise<DBSegment[]> {
|
|||
const DBSegments: DBSegment[] = [];
|
||||
for (let UUID of UUIDs) {
|
||||
// if UUID is invalid, skip
|
||||
if (!isValidSegmentUUID(UUID)) {
|
||||
continue;
|
||||
}
|
||||
if (!isValidSegmentUUID(UUID)) continue;
|
||||
DBSegments.push(await getSegmentFromDBByUUID(UUID as SegmentUUID));
|
||||
}
|
||||
return DBSegments;
|
||||
|
@ -45,7 +43,7 @@ async function handleGetSegmentInfo(req: Request, res: Response) {
|
|||
}
|
||||
const DBSegments = await getSegmentsByUUID(UUIDs);
|
||||
// all uuids failed lookup
|
||||
if (DBSegments.length === 0) {
|
||||
if (!DBSegments?.length) {
|
||||
res.sendStatus(400);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue