Switch to case sensitive and get submitting + getting working

This commit is contained in:
Ajay Ramachandran
2021-03-04 20:23:05 -05:00
parent 1a66be8665
commit 2772a9dcc6
16 changed files with 87 additions and 87 deletions

View File

@@ -33,12 +33,12 @@ export async function deleteNoSegments(req: Request, res: Response) {
return;
}
const entries = (await db.prepare("all", 'SELECT * FROM noSegments WHERE videoID = ?', [videoID])).filter((entry: any) => {
const entries = (await db.prepare("all", 'SELECT * FROM "noSegments" WHERE "videoID" = ?', [videoID])).filter((entry: any) => {
return (categories.indexOf(entry.category) !== -1);
});
for (const entry of entries) {
await db.prepare('run', 'DELETE FROM noSegments WHERE videoID = ? AND category = ?', [videoID, entry.category]);
await db.prepare('run', 'DELETE FROM "noSegments" WHERE "videoID" = ? AND "category" = ?', [videoID, entry.category]);
}
res.status(200).json({message: 'Removed no segments entrys for video ' + videoID});