mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 23:47:00 +03:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into switch-axios
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import {Request, Response} from "express";
|
||||
import {Logger} from "../utils/logger";
|
||||
import {isUserVIP} from "../utils/isUserVIP";
|
||||
import {getMaxResThumbnail, YouTubeAPI} from "../utils/youtubeApi";
|
||||
import {db, privateDB} from "../databases/databases";
|
||||
import {dispatchEvent, getVoteAuthor, getVoteAuthorRaw} from "../utils/webhookUtils";
|
||||
import {getFormattedTime} from "../utils/getFormattedTime";
|
||||
import {getIP} from "../utils/getIP";
|
||||
import {getHash} from "../utils/getHash";
|
||||
import {config} from "../config";
|
||||
import { Request, Response } from "express";
|
||||
import { Logger } from "../utils/logger";
|
||||
import { isUserVIP } from "../utils/isUserVIP";
|
||||
import { getMaxResThumbnail, YouTubeAPI } from "../utils/youtubeApi";
|
||||
import { db, privateDB } from "../databases/databases";
|
||||
import { dispatchEvent, getVoteAuthor, getVoteAuthorRaw } from "../utils/webhookUtils";
|
||||
import { getFormattedTime } from "../utils/getFormattedTime";
|
||||
import { getIP } from "../utils/getIP";
|
||||
import { getHash } from "../utils/getHash";
|
||||
import { config } from "../config";
|
||||
import { UserID } from "../types/user.model";
|
||||
import { Category, CategoryActionType, HashedIP, IPAddress, SegmentUUID, Service, VideoID, VideoIDHash, Visibility } from "../types/segments.model";
|
||||
import { getCategoryActionType } from "../utils/categoryInfo";
|
||||
@@ -135,7 +135,7 @@ async function sendWebhooks(voteData: VoteData) {
|
||||
},
|
||||
}],
|
||||
})
|
||||
.then(async res => {
|
||||
.then(res => {
|
||||
if (res.status >= 400) {
|
||||
Logger.error("Error sending reported submission Discord hook");
|
||||
Logger.error(JSON.stringify((res.data)));
|
||||
@@ -453,6 +453,6 @@ export async function voteOnSponsorTime(req: Request, res: Response): Promise<Re
|
||||
return res.status(finalResponse.finalStatus).send(finalResponse.finalMessage ?? undefined);
|
||||
} catch (err) {
|
||||
Logger.error(err as string);
|
||||
return res.status(500).json({error: "Internal error creating segment vote"});
|
||||
return res.status(500).json({ error: "Internal error creating segment vote" });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user