mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +03:00
Fixed crashes from multiple submissions.
This commit is contained in:
@@ -243,8 +243,6 @@ module.exports = async function postSkipSegments(req, res) {
|
|||||||
|
|
||||||
//add to private db as well
|
//add to private db as well
|
||||||
privateDB.prepare("INSERT INTO sponsorTimes VALUES(?, ?, ?)").run(videoID, hashedIP, timeSubmitted);
|
privateDB.prepare("INSERT INTO sponsorTimes VALUES(?, ?, ?)").run(videoID, hashedIP, timeSubmitted);
|
||||||
|
|
||||||
res.sendStatus(200);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
//a DB change probably occurred
|
//a DB change probably occurred
|
||||||
res.sendStatus(502);
|
res.sendStatus(502);
|
||||||
@@ -261,5 +259,9 @@ module.exports = async function postSkipSegments(req, res) {
|
|||||||
console.error(err);
|
console.error(err);
|
||||||
|
|
||||||
res.sendStatus(500);
|
res.sendStatus(500);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res.sendStatus(200);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user