- checkPermission(permission, jwtSecret, userRoleKey?, userCollectionName?): ((req, res, next) => Promise<undefined | Response<any, Record<string, any>>>)[]
-
Parameters
-
permission: string[]
-
jwtSecret: string
-
userRoleKey: string = 'role'
-
userCollectionName: string = 'users'
Returns ((req, res, next) => Promise<undefined | Response<any, Record<string, any>>>)[]
Description
this function is used to check permission
Example
Example
if you want to use it in a specific route