mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
make tests hit webhook code
This commit is contained in:
@@ -16,5 +16,12 @@
|
|||||||
"privateDBSchema": "./databases/_private.db.sql",
|
"privateDBSchema": "./databases/_private.db.sql",
|
||||||
"mode": "test",
|
"mode": "test",
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"webhooks": []
|
"webhooks": [{
|
||||||
|
"url": "http://127.0.0.1:8081/CustomWebhook",
|
||||||
|
"key": "superSecretKey",
|
||||||
|
"scopes": [
|
||||||
|
"vote.up",
|
||||||
|
"vote.down"
|
||||||
|
]
|
||||||
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ app.post('/CompletelyIncorrectReportWebhook', (req, res) => {
|
|||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
app.post('/CustomWebhook', (req, res) => {
|
||||||
|
res.sendStatus(200);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
module.exports = function createMockServer(callback) {
|
module.exports = function createMockServer(callback) {
|
||||||
return app.listen(config.mockPort, callback);
|
return app.listen(config.mockPort, callback);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user