mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 23:47:00 +03:00
add service to table only have videoID
This commit is contained in:
@@ -290,7 +290,8 @@ export async function voteOnSponsorTime(req: Request, res: Response): Promise<Re
|
||||
if (!isVIP && type != 1) {
|
||||
const isSegmentLocked = async () => !!(await db.prepare("get", `SELECT "locked" FROM "sponsorTimes" WHERE "UUID" = ?`, [UUID]))?.locked;
|
||||
const isVideoLocked = async () => !!(await db.prepare("get", `SELECT "lockCategories".category from "lockCategories" left join "sponsorTimes"
|
||||
on ("lockCategories"."videoID" = "sponsorTimes"."videoID" and "lockCategories".category = "sponsorTimes".category)
|
||||
on ("lockCategories"."videoID" = "sponsorTimes"."videoID" and
|
||||
"lockCategories"."service" = "sponsorTimes"."service" and "lockCategories".category = "sponsorTimes".category)
|
||||
where "UUID" = ?`, [UUID]));
|
||||
|
||||
if (await isSegmentLocked() || await isVideoLocked()) {
|
||||
|
||||
Reference in New Issue
Block a user