Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49600e0

Browse files
Domin0deYankai Zhu
and
Yankai Zhu
authored
Minor Fix for Event Data Fetching (#60)
* Added backend events API* polished code* Fix to read fetched events data correctly---------Co-authored-by: Yankai Zhu <z5482795@ad.unsw.edu.au>
1 parent1f2ba56 commit49600e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎backend/src/data/eventData.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ export async function fetchEvents() {
5959
`https://graph.facebook.com/${FB_API_VERSION}/${process.env.FB_EVENT_PAGE_ID}/events?access_token=${process.env.FB_ACCESS_TOKEN}&fields=id,name,cover,place,start_time,end_time`
6060
);
6161

62-
constres:Result<FacebookEventsResponse,FacebookError>=awaitresponse.json();
63-
if(!res||res.type===ResultType.Err){
64-
console.log(`No events found...\n${res}`);
62+
if(!response||response.type===ResultType.Err){
63+
console.log(`No events found...\n${response}`);
6564
return[];
6665
}
66+
constres:FacebookEventsResponse=awaitresponse.json();
6767

68-
constprocessed=res.value.data.map(
68+
constprocessed=res.data.map(
6969
(e)=>
7070
newEventInfo(
7171
e.id,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp