feat: integra microsserive de reviews

This commit is contained in:
2026-05-30 14:34:15 -05:00
parent d4108f5634
commit 60649fbf50
5 changed files with 697 additions and 3 deletions

View File

@@ -8,6 +8,11 @@ const PROTECTED_ROUTES: AuthRouteRequirement[] = [
{
method: 'GET',
path: '/dashboard'
},
{
method: 'GET',
path: '/api/profile/',
prefix: true
}
]
@@ -37,8 +42,10 @@ export function getRouteRequirement(method: string, path: string): AuthRouteRequ
const normalizedPath = normalizePath(path)
return (
PROTECTED_ROUTES.find(
(route) => route.method === normalizedMethod && route.path === normalizedPath
) ?? null
PROTECTED_ROUTES.find((route) => {
if (route.method !== normalizedMethod) return false
if (route.prefix) return normalizedPath.startsWith(route.path)
return route.path === normalizedPath
}) ?? null
)
}