Added default route

This commit is contained in:
Ralfs 2021-04-10 01:08:41 +03:00
parent a490cb1658
commit d763474485
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,11 @@ app.use(mongo({ uri: config.dbConnectionString }, { useUnifiedTopology: true }))
initiateTelegramBot();
router.get('/', async(ctx, next) => {
ctx.res.statusCode = 200;
await next();
})
router.post('/alerts', async(ctx, next) => {
try {
const alert = ctx.request.body;