Skip to content

Commit 43dcdf6

Browse files
committed
no-mistakes(test): Sync stale example routes.ts owned copies
1 parent 8ec32b8 commit 43dcdf6

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎examples/advanced-modeling/codegen/generators/routes.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,10 @@ export const routesFile = function routesFile(opts?: RoutesFileOpts): Generator
735735
name: "routes-file",
736736
// Read by the api reference (`apiDocsFile()`): it lists the verbs this file mounts, so an
737737
// `expose` you pass here is honoured there. Keep this line if you change what the file mounts.
738-
mountsRoutes: opts?.expose !== undefined ? { expose: opts.expose } : {},
738+
mountsRoutes: {
739+
...(opts?.expose !== undefined && { expose: opts.expose }),
740+
...(opts?.filter !== undefined && { filter: opts.filter }),
741+
},
739742
// TPH subtypes get no standalone routes file (their routes live in the discriminator
740743
// base's); AND-composed with your filter.
741744
// #248 R2: an object with no declared/inherited source.rdb (of ANY kind) isn't

‎examples/showcase/codegen/generators/routes.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,10 @@ export const routesFile = function routesFile(opts?: RoutesFileOpts): Generator
735735
name: "routes-file",
736736
// Read by the api reference (`apiDocsFile()`): it lists the verbs this file mounts, so an
737737
// `expose` you pass here is honoured there. Keep this line if you change what the file mounts.
738-
mountsRoutes: opts?.expose !== undefined ? { expose: opts.expose } : {},
738+
mountsRoutes: {
739+
...(opts?.expose !== undefined && { expose: opts.expose }),
740+
...(opts?.filter !== undefined && { filter: opts.filter }),
741+
},
739742
// TPH subtypes get no standalone routes file (their routes live in the discriminator
740743
// base's); AND-composed with your filter.
741744
// #248 R2: an object with no declared/inherited source.rdb (of ANY kind) isn't

0 commit comments

Comments
 (0)