Skip to content

Commit

Permalink
Merge pull request #313 from COS301-SE-2024/hotfix/empty-dashboard-fix
Browse files Browse the repository at this point in the history
refined error handling for edge case that's resulting in empty dashboard
  • Loading branch information
MatthewEls authored Jul 29, 2024
2 parents d42384d + 24295cc commit 41003eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions backend/.chalice/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
]
},
"environment_variables": {
"API_ENV": "dev"
"API_ENV": "dev",
"USER_POOL_ID": "eu-west-1_xhcBZxRZk"
}
},
"prod": {
Expand All @@ -23,7 +24,8 @@
]
},
"environment_variables": {
"API_ENV": "prod"
"API_ENV": "prod",
"USER_POOL_ID": "eu-west-1_xhcBZxRZk"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/services/tickets.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function getWatchlistTickets(username: string, user_session: string

const result = await response.json();

if (result.Status) {
if (!Array.isArray(result.data)) {
return [];
}

Expand Down Expand Up @@ -136,7 +136,7 @@ export async function getTicketsInMunicipality(municipality: string | undefined,

const result = await response.json();

if (result.Status) {
if (!Array.isArray(result.data)) {
return [];
}

Expand Down

0 comments on commit 41003eb

Please sign in to comment.