☎️ Web interface for viewing and processing Asterisk call logs (2020)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
629 B

2 years ago
'use strict';
const Boom = require('@hapi/boom');
const Rfr = require('rfr');
const knownMethods = ['GET', 'POST'];
module.exports = [
...Rfr('/server/sections/calls').routes,
...Rfr('/server/recording').routes,
...Rfr('/server/fe').routes,
...Rfr('/server/originate').routes,
{
method: '*',
path: '/{p*}',
handler: (request, h) => {
if (knownMethods.includes(request.method.toUpperCase())) {
return Boom.notFound();
} else {
return Boom.methodNotAllowed(undefined, undefined, knownMethods);
}
}
}
];