diff options
Diffstat (limited to 'frontend/src/api')
| -rw-r--r-- | frontend/src/api/Maps.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.tsx index 2209788..80f88d4 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 | |||
| 75 | return response.data.success; | 75 | return response.data.success; |
| 76 | }; | 76 | }; |
| 77 | 77 | ||
| 78 | export const post_record = async (token: string, run: UploadRunContent): Promise<string> => { | 78 | export const post_record = async (token: string, run: UploadRunContent): Promise<[boolean, string]> => { |
| 79 | if (run.partner_demo) { | 79 | if (run.partner_demo) { |
| 80 | const response = await axios.postForm(url(`maps/${run.map_id}/record`), { | 80 | const response = await axios.postForm(url(`maps/${run.map_id}/record`), { |
| 81 | "host_demo": run.host_demo, | 81 | "host_demo": run.host_demo, |
| @@ -85,7 +85,7 @@ export const post_record = async (token: string, run: UploadRunContent): Promise | |||
| 85 | "Authorization": token, | 85 | "Authorization": token, |
| 86 | } | 86 | } |
| 87 | }); | 87 | }); |
| 88 | return response.data.message; | 88 | return [ response.data.success, response.data.message ]; |
| 89 | } else { | 89 | } else { |
| 90 | const response = await axios.postForm(url(`maps/${run.map_id}/record`), { | 90 | const response = await axios.postForm(url(`maps/${run.map_id}/record`), { |
| 91 | "host_demo": run.host_demo, | 91 | "host_demo": run.host_demo, |
| @@ -94,7 +94,7 @@ export const post_record = async (token: string, run: UploadRunContent): Promise | |||
| 94 | "Authorization": token, | 94 | "Authorization": token, |
| 95 | } | 95 | } |
| 96 | }); | 96 | }); |
| 97 | return response.data.message; | 97 | return [ response.data.success, response.data.message ]; |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | 100 | ||