token-permissions: update middleware further

This commit is contained in:
May 2023-10-02 18:27:48 -07:00
parent a04cc9a376
commit fad320d7fb

View file

@ -32,8 +32,6 @@ export const requiresAdmin: RequestHandler = function(_req, res, next) {
next()
}
export namespace apiBlockers {
/**
* @description Blocks requests based on the permissions which a token has. Does not apply to routes being accessed with a token of type `User`
* @param tokenPermissions Permissions which your route requires.
@ -72,5 +70,3 @@ export namespace apiBlockers {
if (auth.getType(tokenFor(req)) == "App") ServeError(res, 403, "apps are not allowed to access this endpoint")
else next()
}
}