Closed DesimirDimitrov closed 11 months ago
In the README.md
This code doesn't work:
{ preHandler: [fastify.guard.role(['cto', 'admin'])] },
Instead it should be without []
{ preHandler: [fastify.guard.role('cto', 'admin')] },
role(['editor', 'admin']) - can only be called by users who have 'editor' AND 'admin' role role('editor', 'admin') - can only be called by users who have 'editor' OR 'admin' roles
role(['editor', 'admin'])
role('editor', 'admin')
In the README.md
This code doesn't work:
{ preHandler: [fastify.guard.role(['cto', 'admin'])] },
Instead it should be without []
{ preHandler: [fastify.guard.role('cto', 'admin')] },