add getByHash tests, remove redundant check

- `{}` always returns true so the early exit is never taken
This commit is contained in:
Michael C
2022-09-24 21:43:52 -04:00
parent a00048aaac
commit 7457b51aa4
2 changed files with 74 additions and 2 deletions

View File

@@ -67,8 +67,6 @@ export async function getSkipSegmentsByHash(req: Request, res: Response): Promis
// Get all video id's that match hash prefix
const segments = await getSegmentsByHash(req, hashPrefix, categories, actionTypes, requiredSegments, service);
if (!segments) return res.status(404).json([]);
const output = Object.entries(segments).map(([videoID, data]) => ({
videoID,
hash: data.hash,