1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Return 401 instead of 403

This commit is contained in:
Adria Navarro 2024-07-10 13:26:02 +02:00
parent b06eb277a4
commit 8b40e80750

View file

@ -96,7 +96,7 @@ const authorized =
}
if (!ctx.user) {
return ctx.throw(403, "No user info found")
return ctx.throw(401, "No user info found")
}
// get the resource roles
@ -148,7 +148,7 @@ const authorized =
// check authenticated
if (!ctx.isAuthenticated) {
return ctx.throw(403, "Session not authenticated")
return ctx.throw(401, "Session not authenticated")
}
// check general builder stuff, this middleware is a good way