forgot to return reason

This commit is contained in:
Michael C 2021-07-14 14:30:36 -04:00
parent 8ee51a1cb0
commit 42423a86a6
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4

View file

@ -49,7 +49,7 @@ export async function getLockCategoriesByHash(req: Request, res: Response): Prom
try {
// Get existing lock categories markers
const lockedRows = await db.prepare("all", 'SELECT "videoID", "hashedVideoID" as "hash", "category" from "lockCategories" where "hashedVideoID" LIKE ?', [`${hashPrefix}%`]) as DBLock[];
const lockedRows = await db.prepare("all", 'SELECT "videoID", "hashedVideoID" as "hash", "category", "reason" from "lockCategories" where "hashedVideoID" LIKE ?', [`${hashPrefix}%`]) as DBLock[];
if (lockedRows.length === 0 || !lockedRows[0]) return res.sendStatus(404);
// merge all locks
return res.send(mergeLocks(lockedRows));