In the doc there is one, but i dont want to redirect, it’s a api route, i juste want to change user role, and if the user is not an admin i put flash “Unauthorized access”. i can in fact put status 401 and render and error.json …
In the doc there is one, but i dont want to redirect, it’s a api route, i juste want to change user role, and if the user is not an admin i put flash “Unauthorized access”. i can in fact put status 401 and render and error.json …