mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(api): 🚚 Change ApiRouteMetadata structure to be more consistent
This commit is contained in:
parent
00fd751c2a
commit
924ff9b2d4
3 changed files with 8 additions and 3 deletions
|
|
@ -158,7 +158,7 @@ const checkRouteNeedsAuth = (
|
|||
);
|
||||
}
|
||||
|
||||
if (authData.requiredOnMethods?.includes(context.req.method as HttpVerb)) {
|
||||
if (authData.methodOverrides?.[context.req.method as HttpVerb]) {
|
||||
return context.json(
|
||||
{
|
||||
error: "Unauthorized",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue