aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/api/Maps.ts
diff options
context:
space:
mode:
authorArda Serdar Pektezol <1669855+pektezol@users.noreply.github.com>2024-11-21 20:06:15 +0300
committerGitHub <noreply@github.com>2024-11-21 20:06:15 +0300
commit53337bad0623a5f32c87d760bc03efb3cfe4eab6 (patch)
tree7a542d6ba9c453c8df60ef1d05781cf1ac75b6a0 /frontend/src/api/Maps.ts
parentfeat/backend: gdrive to backblaze migration, improve create record (#237) (diff)
downloadlphub-53337bad0623a5f32c87d760bc03efb3cfe4eab6.tar.gz
lphub-53337bad0623a5f32c87d760bc03efb3cfe4eab6.tar.bz2
lphub-53337bad0623a5f32c87d760bc03efb3cfe4eab6.zip
feat/frontend: remove map select from upload run dialog (#239)
Diffstat (limited to 'frontend/src/api/Maps.ts')
-rw-r--r--frontend/src/api/Maps.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/frontend/src/api/Maps.ts b/frontend/src/api/Maps.ts
index 89657b5..3832a2e 100644
--- a/frontend/src/api/Maps.ts
+++ b/frontend/src/api/Maps.ts
@@ -73,9 +73,9 @@ export const delete_map_discussion = async (token: string, map_id: string, discu
73 return response.data.success; 73 return response.data.success;
74}; 74};
75 75
76export const post_record = async (token: string, run: UploadRunContent): Promise<[boolean, string]> => { 76export const post_record = async (token: string, run: UploadRunContent, map_id: number): Promise<[boolean, string]> => {
77 if (run.partner_demo) { 77 if (run.partner_demo) {
78 const response = await axios.postForm(url(`maps/${run.map_id}/record`), { 78 const response = await axios.postForm(url(`maps/${map_id}/record`), {
79 "host_demo": run.host_demo, 79 "host_demo": run.host_demo,
80 "partner_demo": run.partner_demo, 80 "partner_demo": run.partner_demo,
81 }, { 81 }, {
@@ -83,16 +83,16 @@ export const post_record = async (token: string, run: UploadRunContent): Promise
83 "Authorization": token, 83 "Authorization": token,
84 } 84 }
85 }); 85 });
86 return [ response.data.success, response.data.message ]; 86 return [response.data.success, response.data.message];
87 } else { 87 } else {
88 const response = await axios.postForm(url(`maps/${run.map_id}/record`), { 88 const response = await axios.postForm(url(`maps/${map_id}/record`), {
89 "host_demo": run.host_demo, 89 "host_demo": run.host_demo,
90 }, { 90 }, {
91 headers: { 91 headers: {
92 "Authorization": token, 92 "Authorization": token,
93 } 93 }
94 }); 94 });
95 return [ response.data.success, response.data.message ]; 95 return [response.data.success, response.data.message];
96 } 96 }
97} 97}
98 98