How to run the client on a server route as admin

Hi, I am using Nuxt and have the admin plugin installed. I want to List all users, which is possible If the user doing the query is of role "admin". But if not, the query fails, which is correct. But, how would I do this in a server environment? I need to check in a server route if a user exists, how do i do this? If I dont pass headers, I get 401, If I do, I get 403.
1 Reply
Dustin
DustinOP2w ago
Do I just use kysely to query the DB?

Did you find this page helpful?