refactor(api): 🚚 Change ApiRouteMetadata structure to be more consistent

This commit is contained in:
Jesse Wierzbinski 2024-06-13 18:03:17 -10:00
parent 00fd751c2a
commit 924ff9b2d4
No known key found for this signature in database
3 changed files with 8 additions and 3 deletions

View file

@ -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",