mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 13:37:01 +03:00
fix non-format eslint in src/
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {db} from '../databases/databases';
|
||||
import {Logger} from '../utils/logger';
|
||||
import {Request, Response} from 'express';
|
||||
import {db} from "../databases/databases";
|
||||
import {Logger} from "../utils/logger";
|
||||
import {Request, Response} from "express";
|
||||
import { Category, VideoID } from "../types/segments.model";
|
||||
|
||||
export async function getLockCategories(req: Request, res: Response): Promise<Response> {
|
||||
@@ -13,7 +13,7 @@ export async function getLockCategories(req: Request, res: Response): Promise<Re
|
||||
|
||||
try {
|
||||
// Get existing lock categories markers
|
||||
const lockedCategories = await db.prepare('all', 'SELECT "category" from "lockCategories" where "videoID" = ?', [videoID]) as {category: Category}[];
|
||||
const lockedCategories = await db.prepare("all", 'SELECT "category" from "lockCategories" where "videoID" = ?', [videoID]) as {category: Category}[];
|
||||
if (lockedCategories.length === 0 || !lockedCategories[0]) return res.sendStatus(404);
|
||||
// map to array in JS becaues of SQL incompatibilities
|
||||
const categories = Object.values(lockedCategories).map((entry) => entry.category);
|
||||
|
||||
Reference in New Issue
Block a user