Skip to content

Commit db7065c

Browse files
authored
fix type error
1 parent e3177d1 commit db7065c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

backend/src/data/eventData.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,14 @@ export async function fetchEvent(id: string) {
8787
if (!response.ok) {
8888
throw new Error(`Couldn't fetch details for event ${id}\n${JSON.stringify(response.json())}`);
8989
}
90-
const res: Result<FacebookEvent, FacebookError> = await response.json();
90+
const res: FacebookEvent = await response.json();
9191

9292
return new EventInfo(
93-
res.value.id,
94-
res.value.name,
95-
res.value.start_time,
96-
res.value.end_time,
97-
res.value.place?.name ?? DEFAULT_EVENT_LOCATION,
98-
res.value.cover?.source ?? DEFAULT_EVENT_IMAGE
93+
res.id,
94+
res.name,
95+
res.start_time,
96+
res.end_time,
97+
res.place?.name ?? DEFAULT_EVENT_LOCATION,
98+
res.cover?.source ?? DEFAULT_EVENT_IMAGE
9999
);
100100
}

0 commit comments

Comments
 (0)