mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 23:47:00 +03:00
Merge branch 'testing' of github.com:ajayyy/SponsorBlockServer into testing
This commit is contained in:
@@ -58,8 +58,8 @@ function cleanGetSegments(videoID, categories) {
|
||||
return segments;
|
||||
} catch (err) {
|
||||
if (err) {
|
||||
logger.error('j 2 Query failed');
|
||||
return undefined;
|
||||
logger.error(err);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,7 +162,7 @@ function handleGetSegments(req, res) {
|
||||
|
||||
let segments = cleanGetSegments(videoID, categories);
|
||||
|
||||
if (segments === undefined) {
|
||||
if (segments === null || segments === undefined) {
|
||||
res.sendStatus(500);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@ function getVoteAuthorRaw(submissionCount, isVIP, isOwnSubmission) {
|
||||
function getVoteAuthor(submissionCount, isVIP, isOwnSubmission) {
|
||||
if (submissionCount === 0) {
|
||||
return "Report by New User";
|
||||
} else if (isVIP) {
|
||||
return "Report by VIP User";
|
||||
} else if (isOwnSubmission) {
|
||||
return "Report by Submitter";
|
||||
} else if (isVIP) {
|
||||
return "Report by VIP User";
|
||||
}
|
||||
|
||||
return "";
|
||||
|
||||
Reference in New Issue
Block a user