From d247585843d02b841011c52a8ca6312067412e04 Mon Sep 17 00:00:00 2001 From: Nitish Date: Mon, 13 Nov 2023 12:06:49 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1Added=20more=20properties=20to=20be=20?= =?UTF-8?q?returned=20for=20bus=20service=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/searchBusServices.ts | 2 +- src/types/bus-service-type.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/searchBusServices.ts b/src/routes/searchBusServices.ts index e9f0882..6241b8b 100644 --- a/src/routes/searchBusServices.ts +++ b/src/routes/searchBusServices.ts @@ -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, }, diff --git a/src/types/bus-service-type.ts b/src/types/bus-service-type.ts index 003180d..02c2197 100644 --- a/src/types/bus-service-type.ts +++ b/src/types/bus-service-type.ts @@ -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({