SponsorBlockServer/test/mocks.js
2020-04-23 12:48:02 -04:00

16 lines
No EOL
367 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);
});
module.exports = function createMockServer(callback) {
return app.listen(config.mockPort, callback);
}