From e0f7c29244c43bc30e80a25f4c8e3442f63fe1cf Mon Sep 17 00:00:00 2001 From: Chip Wasson Date: Sat, 18 May 2024 21:54:31 -0600 Subject: [PATCH] Return ID as part of foco-live events and venues --- src/foco-live/foco-live.service.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/foco-live/foco-live.service.ts b/src/foco-live/foco-live.service.ts index 54871c1..4c122e2 100644 --- a/src/foco-live/foco-live.service.ts +++ b/src/foco-live/foco-live.service.ts @@ -28,9 +28,12 @@ export interface Event { "Cost Select": string; Cost: string, "Date Select": string + '"Specials" at Venue': string, + id: string; } export interface Venue { + id: string; "Bar or Venue Name": string, "Street Address": string, "City": string, @@ -42,7 +45,6 @@ export interface Venue { "Facebook Page": string, "Instagram": string, "Twitter Account": string, - } const cacheKeys = { @@ -70,7 +72,10 @@ export class FocoLiveService { return ((await this.airtableBase('Events').select({ view: "Grid view", }).all()) - .map(record => record.fields) as any as Event[]) + .map(record => ({ + id: record.id, + ...record.fields + })) as any as Event[]) .sort(compareDates) .reverse(); } @@ -90,7 +95,10 @@ export class FocoLiveService { return ((await this.airtableBase('Venues').select({ view: "Grid view", }).all()) - .map(record => record.fields) as any as Venue[]) + .map(record => ({ + id: record.id, + ...record.fields + })) as any as Venue[]) .sort(compareDates) .reverse(); }