Update inject-permission.ts

This commit is contained in:
Daniel Hougaard
2024-03-12 21:38:48 +01:00
parent 22b2fb4c98
commit 771498b817

View File

@ -8,10 +8,6 @@ export const injectPermission = fp(async (server) => {
server.addHook("onRequest", async (req) => {
if (!req.auth) return;
// if (!req.auth.authMethod) {
// throw new Error("THIS SHOULD NOT HAPPEN");
// }
if (req.auth.actor === ActorType.USER) {
req.permission = {
type: ActorType.USER,