Skip to content

Commit

Permalink
⚡Added more properties to be returned for bus service search
Browse files Browse the repository at this point in the history
  • Loading branch information
TechSupportz committed Nov 13, 2023
1 parent baa76df commit d247585
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/routes/searchBusServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const searchBusServices = createRouteSpec({
const ms = new MiniSearch({
fields: ["serviceNo"],
idField: "serviceNo",
storeFields: ["serviceNo", "operator"],
storeFields: ["serviceNo", "operator", "isLoopService", "interchanges"],
searchOptions: {
prefix: true,
},
Expand Down
2 changes: 1 addition & 1 deletion src/types/bus-service-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const BusServiceSchema = z.object({
operator: z.string(),
isLoopService: z.boolean(),
interchanges: z.array(SimpleBusStopSchema).length(2),
routes: z.array(z.array(BusRouteStopSchema)).max(2),
routes: z.array(z.array(BusRouteStopSchema)).max(2).optional(),
})

export const BusServiceJSONSchema = z.object({
Expand Down

0 comments on commit d247585

Please sign in to comment.