Skip to content

Commit c0d504e

Browse files
committed
🎨 - refactor: refactored interface for list destruction lists
1 parent 66ebb38 commit c0d504e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: frontend/src/lib/api/destructionLists.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export async function getDestructionList(uuid: string) {
112112
* List destruction lists.
113113
*/
114114
export async function listDestructionLists(
115-
params?: URLSearchParams | (URLSearchParams & { ordering?: string }),
115+
params?: URLSearchParams | { ordering?: string },
116116
) {
117117
const response = await request("GET", "/destruction-lists/", params);
118118
const promise: Promise<DestructionList[]> = response.json();

Diff for: frontend/src/pages/landing/Landing.loader.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ export const landingLoader = loginRequired(
2929
);
3030

3131
export const getStatusMap = async (orderQuery: string | null) => {
32-
const lists = await listDestructionLists(orderQuery ?? "");
32+
const lists = await listDestructionLists({
33+
ordering: orderQuery ?? "",
34+
});
3335
return STATUSES.reduce((acc, val) => {
3436
const status = val[0] || "";
3537
const destructionLists = lists.filter(

0 commit comments

Comments
 (0)