aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/api/Maps.tsx
diff options
context:
space:
mode:
authorWolfboy248 <georgejvindkarlsen@gmail.com>2024-10-18 17:01:01 +0200
committerWolfboy248 <georgejvindkarlsen@gmail.com>2024-10-18 17:01:01 +0200
commitd9974ede3b3914377beb4b07d78885c48bd74aac (patch)
tree6ee6d0adfe62d3ec00dea21dc520dfa09eeaf005 /frontend/src/api/Maps.tsx
parentrefactor: upload run logic improvement (diff)
downloadlphub-d9974ede3b3914377beb4b07d78885c48bd74aac.tar.gz
lphub-d9974ede3b3914377beb4b07d78885c48bd74aac.tar.bz2
lphub-d9974ede3b3914377beb4b07d78885c48bd74aac.zip
refactor: delete run on profile
Diffstat (limited to 'frontend/src/api/Maps.tsx')
-rw-r--r--frontend/src/api/Maps.tsx9
1 files changed, 9 insertions, 0 deletions
diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.tsx
index 6bdc3e6..8295cf2 100644
--- a/frontend/src/api/Maps.tsx
+++ b/frontend/src/api/Maps.tsx
@@ -97,4 +97,13 @@ export const post_record = async (token: string, run: UploadRunContent): Promise
97 }); 97 });
98 return response.data.message; 98 return response.data.message;
99 } 99 }
100}
101
102export const delete_map_record = async (token: string, map_id: number, record_id: number): Promise<boolean> => {
103 const response = await axios.delete(url(`maps/${map_id}/record/${record_id}`), {
104 headers: {
105 "Authorization": token,
106 }
107 });
108 return response.data.success;
100}; 109};