SponsorBlockServer/test/mocks.js
2020-08-24 22:04:18 +01:00

26 lines
No EOL
530 B
JavaScript

var express = require('express');
var app = express();
var config = require('../src/config.js');
app.post('/ReportChannelWebhook', (req, res) => {
res.sendStatus(200);
});
app.post('/FirstTimeSubmissionsWebhook', (req, res) => {
res.sendStatus(200);
});
app.post('/CompletelyIncorrectReportWebhook', (req, res) => {
res.sendStatus(200);
});
app.post('/CustomWebhook', (req, res) => {
res.sendStatus(200);
});
module.exports = function createMockServer(callback) {
return app.listen(config.mockPort, callback);
}