import { Action } from 'routing-controllers' ; import { verify } from '../util' ; export const authorizationChecker = async ( action , roles ? ) => { const token = action . request . headers [ 'authorization' ] ; try { verify ( token ) ; } catch { return false ; } return true ; } ;