From 0d743b7ca2b0f4be54b5d0771e5bb938fb4c40d6 Mon Sep 17 00:00:00 2001 From: upsiflu Date: Tue, 25 Mar 2025 11:04:47 +0100 Subject: [PATCH] fix(front): [regression] re-enable publish action for channel uploads --- front/src/components/channels/UploadForm.vue | 16 +++++----------- front/src/ui/modals/Upload.vue | 8 +++++--- front/src/views/channels/DetailOverview.vue | 10 ++++++---- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/front/src/components/channels/UploadForm.vue b/front/src/components/channels/UploadForm.vue index 0294be7fc..f6055065b 100644 --- a/front/src/components/channels/UploadForm.vue +++ b/front/src/components/channels/UploadForm.vue @@ -404,6 +404,7 @@ const labels = computed(() => ({ })) const publish = async () => { + console.log("TRYING TO PUBLISH") isLoading.value = true errors.value = [] @@ -414,17 +415,10 @@ const publish = async () => { /* { import_status: components["schemas"]["ImportStatusEnum"]; audio_file: string;} */ - // const theUpdate : components['schemas']['PatchedUploadForOwnerRequest'] = { - // import_status: 'pending', - // } - - // await axios.post('uploads/action/', { - // action: 'publish', - // objects: uploadedFiles.value.map((file) => file.response?.uuid) - // } satisfies paths['/api/v2/uploads/action/']['post']['requestBody']['content']['application/json'], - // { - // headers: { 'Authorization': `Bearer ${store.state.auth.oauth}` } - // }) + await axios.post('uploads/action/', { + action: 'publish', + objects: uploadedFiles.value.map((file) => file.response?.uuid) + }) // Tell the store that the uploaded files are pending import store.commit('channels/publish', { diff --git a/front/src/ui/modals/Upload.vue b/front/src/ui/modals/Upload.vue index 31082c664..cbacd8783 100644 --- a/front/src/ui/modals/Upload.vue +++ b/front/src/ui/modals/Upload.vue @@ -1,5 +1,5 @@