Skip to content

Commit

Permalink
Fetch data in a different way
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip-L committed Jan 28, 2025
1 parent e85bd47 commit d6fd7b4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/lib/apiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,8 @@ export const getAllApplications = async (): Promise<
Application[] | undefined
> => {
try {
const applications = (await apiClient.get('/applications')).data.map(
(e: { 0: Application; 1: string; 2: string }) => ({
...e[0],
owner: e[1],
repo: e[2],
}),
)

return applications
const applications = (await apiClient.get('/applications'))
return applications.data
} catch (error: any) {
console.error(error)

Expand Down

0 comments on commit d6fd7b4

Please sign in to comment.