Skip to content

Commit

Permalink
fix route list for default apiRoot
Browse files Browse the repository at this point in the history
  • Loading branch information
jbolda committed Aug 13, 2024
1 parent 98cd93e commit 239c100
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/foundation/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ export function createFoundationSimulationServer<
const router = init.router;
const operations = router.getOperations();
const simulationRoutes = operations.reduce((routes, operation) => {
const url = `${router.apiRoot}${operation.path}`;
const url = `${router.apiRoot === "/" ? "" : router.apiRoot}${
operation.path
}`;
routes[`${operation.method}:${url}`] = {
type: "OpenAPI",
url,
Expand Down

0 comments on commit 239c100

Please sign in to comment.