Make hasStartSegment result optional

This commit is contained in:
Ajay
2025-01-17 23:59:17 -05:00
parent e2a9976cd0
commit 2455d2cd7e
3 changed files with 11 additions and 8 deletions

View File

@@ -11,10 +11,12 @@ export async function getVideoLabelsByHash(req: Request, res: Response): Promise
}
hashPrefix = hashPrefix.toLowerCase() as VideoIDHash;
const checkHasStartSegment = req.query.hasStartSegment === "true";
const service: Service = getService(req.query.service, req.body.service);
// Get all video id's that match hash prefix
const segments = await getLabelsByHash(hashPrefix, service);
const segments = await getLabelsByHash(hashPrefix, service, checkHasStartSegment);
if (!segments) return res.status(404).json([]);