Skip to content

Commit

Permalink
feat(sort): update GET requests from hub to retrieve last updated res…
Browse files Browse the repository at this point in the history
…ults first
  • Loading branch information
brucetony committed Sep 2, 2024
1 parent 0e0b182 commit 125ff8a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion composables/useAPIFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,30 @@ export function getProposals(opts?) {
return useAPIFetch<{ data: ListProjectNodes }>("/project-nodes", {
...opts,
method: "GET",
query: { include: "project,node" },
query: {
include: "project,node",
sort: "-updated_at",
},
});
}

export function getProjects(opts?) {
return useAPIFetch<{ data: AllProjects }>("/projects", {
...opts,
method: "GET",
query: {
sort: "-updated_at",
},
});
}

export function getAnalyses(opts?) {
return useAPIFetch<{ data: AllAnalyses }>("/analyses", {
...opts,
method: "GET",
query: {
sort: "-updated_at",
},
});
}

Expand All @@ -68,6 +77,9 @@ export function getAnalysisNodes(opts?) {
{
...opts,
method: "GET",
query: {
sort: "-updated_at",
},
},
);
}
Expand Down

0 comments on commit 125ff8a

Please sign in to comment.