From c5154b2203342280a0cf75bb5f25311e6112400e Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:41:44 +0300 Subject: frontend: update profile after upload run --- frontend/src/api/Maps.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend/src/api') diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.tsx index 2209788..e57fc45 100644 --- a/frontend/src/api/Maps.tsx +++ b/frontend/src/api/Maps.tsx @@ -75,7 +75,7 @@ export const delete_map_discussion = async (token: string, map_id: string, discu return response.data.success; }; -export const post_record = async (token: string, run: UploadRunContent): Promise => { +export const post_record = async (token: string, run: UploadRunContent): Promise<[boolean, string]> => { if (run.partner_demo) { const response = await axios.postForm(url(`maps/${run.map_id}/record`), { "host_demo": run.host_demo, @@ -94,7 +94,7 @@ export const post_record = async (token: string, run: UploadRunContent): Promise "Authorization": token, } }); - return response.data.message; + return [ response.data.success, response.data.message ]; } } -- cgit v1.2.3