Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into nb-mod-fetch

# Conflicts:
#	src/routes/postSkipSegments.js
#	test/mocks.js
This commit is contained in:
Ajay Ramachandran
2020-08-29 21:03:13 -04:00
9 changed files with 315 additions and 135 deletions

View File

@@ -15,6 +15,8 @@ app.post('/CompletelyIncorrectReportWebhook', (req, res) => {
res.sendStatus(200);
});
// Testing NeuralBlock
app.get('/NeuralBlock/api/checkSponsorSegments', (req, res) => {
if (req.query.vid === "LevkAjUE6d4") {
res.json({
@@ -36,6 +38,11 @@ app.get('/NeuralBlock/api/getSponsorSegments', (req, res) => {
res.sendStatus(500);
});
// Testing webhooks
app.post('/CustomWebhook', (req, res) => {
res.sendStatus(200);
});
module.exports = function createMockServer(callback) {
return app.listen(config.mockPort, callback);
}