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/Maps.tsx')

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<string> => {
+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


From 83f138fff4999348262845c2b8ab2a9dbbf318a8 Mon Sep 17 00:00:00 2001
From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>
Date: Tue, 22 Oct 2024 18:26:35 +0300
Subject: frontend: fix broken msg for coop submission

---
 frontend/src/api/Maps.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'frontend/src/api/Maps.tsx')

diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.tsx
index e57fc45..80f88d4 100644
--- a/frontend/src/api/Maps.tsx
+++ b/frontend/src/api/Maps.tsx
@@ -85,7 +85,7 @@ export const post_record = async (token: string, run: UploadRunContent): Promise
         "Authorization": token,
       }
     });
-    return response.data.message;
+    return [ response.data.success, response.data.message ];
   } else {
     const response = await axios.postForm(url(`maps/${run.map_id}/record`), {
       "host_demo": run.host_demo,
-- 
cgit v1.2.3

