diff --git a/src/routes/postSkipSegments.js b/src/routes/postSkipSegments.js index afa26f5..795796f 100644 --- a/src/routes/postSkipSegments.js +++ b/src/routes/postSkipSegments.js @@ -243,8 +243,6 @@ module.exports = async function postSkipSegments(req, res) { //add to private db as well privateDB.prepare("INSERT INTO sponsorTimes VALUES(?, ?, ?)").run(videoID, hashedIP, timeSubmitted); - - res.sendStatus(200); } catch (err) { //a DB change probably occurred res.sendStatus(502); @@ -261,5 +259,9 @@ module.exports = async function postSkipSegments(req, res) { console.error(err); res.sendStatus(500); + + return; } + + res.sendStatus(200); }