Skip to content

Commit

Permalink
Ensured a Promise is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff McMillen authored and Jeff McMillen committed Dec 6, 2024
1 parent 5dbdba8 commit 2a3a072
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions client/src/hooks/datafiles/mutations/useTrash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function trashUtil({
system: string;
path: string;
homeDir: string;
}) {
}): Promise<{ file: any; path: string }> {
const url = `/api/datafiles/${api}/trash/${scheme}/${system}/${path}/`;
const body = {
homeDir: homeDir,
Expand All @@ -27,15 +27,6 @@ export async function trashUtil({
},
withCredentials: true,
});
// const request = await fetch(url, {
// method: 'PUT',
// headers: { 'X-CSRFToken': Cookies.get('csrftoken') || '' },
// credentials: 'same-origin',
// body: JSON.stringify({
// homeDir: homeDir,
// }),
// });
// const request = await apiClient.put(url, body);

return response.data;
}
Expand Down

0 comments on commit 2a3a072

Please sign in to comment.