hmt %!s(int64=3) %!d(string=hai) anos
pai
achega
cc1e9451b7
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      app.ts

+ 2 - 2
app.ts

@@ -14,10 +14,10 @@ router.use((req, res, next)=> {
   next()
 });
 // check authentication via checksum
-router.use(":call", (req, res, next) => {
+router.use("/:call", (req, res, next) => {
   const handler = new BBB(req)
   const authenticated = handler.authenticated(secret)
-  console.log(`${date()} New call to ${Color.green(handler.call)} ${authenticated ? Color.red('Rejected'):''}`)
+  console.log(`${date()} New call to ${Color.green(handler.call)} ${authenticated ? '':Color.red('Rejected')}`)
   if (authenticated) { 
     res.locals.handler = handler
     next()