why is this broken

This commit is contained in:
Jesse Wierzbinski 2024-04-14 01:57:26 -10:00
parent e575075006
commit 86dd0eb7ef
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View file

@ -99,10 +99,8 @@ export const routeMatcher = new Bun.FileSystemRouter({
dir: `${process.cwd()}/server/api`, dir: `${process.cwd()}/server/api`,
}); });
export const matchRoute = async (url: string) => { export const matchRoute = (url: string) => {
const route = routeMatcher.match(url); const route = routeMatcher.match(url);
console.log(route);
return route ?? null; return route ?? null;
}; };

View file

@ -116,10 +116,12 @@ export const createServer = (
} }
// If route is .well-known, remove dot because the filesystem router can't handle dots for some reason // If route is .well-known, remove dot because the filesystem router can't handle dots for some reason
const matchedRoute = await matchRoute( const matchedRoute = matchRoute(
req.url.replace(".well-known", "well-known"), req.url.replace(".well-known", "well-known"),
); );
console.log(matchedRoute);
if ( if (
matchedRoute && matchedRoute &&
Object.keys(matchedRoute).length !== 0 && Object.keys(matchedRoute).length !== 0 &&