Add authorization
This commit is contained in:
@@ -12,6 +12,8 @@ export default function organizationRoutes(fastify: FastifyInstance) {
|
||||
201: $org("createOrgResponse"),
|
||||
},
|
||||
},
|
||||
config: { requiredClaims: ["org:write"] },
|
||||
preHandler: [fastify.authorize],
|
||||
},
|
||||
createOrgHandler
|
||||
);
|
||||
@@ -27,6 +29,7 @@ export default function organizationRoutes(fastify: FastifyInstance) {
|
||||
},
|
||||
},
|
||||
},
|
||||
config: { requiredClaims: ["org:read"] },
|
||||
},
|
||||
getOrgHandler
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user