mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 00:18:19 +01:00
why is this broken
This commit is contained in:
parent
e575075006
commit
86dd0eb7ef
|
|
@ -99,10 +99,8 @@ export const routeMatcher = new Bun.FileSystemRouter({
|
|||
dir: `${process.cwd()}/server/api`,
|
||||
});
|
||||
|
||||
export const matchRoute = async (url: string) => {
|
||||
export const matchRoute = (url: string) => {
|
||||
const route = routeMatcher.match(url);
|
||||
|
||||
console.log(route);
|
||||
|
||||
return route ?? null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
const matchedRoute = await matchRoute(
|
||||
const matchedRoute = matchRoute(
|
||||
req.url.replace(".well-known", "well-known"),
|
||||
);
|
||||
|
||||
console.log(matchedRoute);
|
||||
|
||||
if (
|
||||
matchedRoute &&
|
||||
Object.keys(matchedRoute).length !== 0 &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue