diff --git a/front/src/components/audio/ChannelForm.vue b/front/src/components/audio/ChannelForm.vue index 5fbb23b39..aaa43e814 100644 --- a/front/src/components/audio/ChannelForm.vue +++ b/front/src/components/audio/ChannelForm.vue @@ -44,7 +44,7 @@ const newValues = reactive({ description: props.object?.artist?.description?.text ?? '', cover: props.object?.artist?.cover?.uuid ?? null, content_category: props.object?.artist?.content_category ?? 'podcast', - metadata: { ...(props.object?.metadata ?? {}) } + metadata: { ...(props.object?.metadata ?? {}) } as Channel['metadata'] }) const tagList = computed(() => ({ @@ -125,10 +125,8 @@ watchEffect(() => emit('submittable', submittable.value)) const fetchMetadataChoices = async () => { try { const response = await axios.get('channels/metadata-choices/') - // Old code expected as a response { language, itunes_category? } - // but actual response is Channel - if (response.data.metadata) - metadataChoices.value = response.data.metadata + // TODO: Fix schema generation so we don't need to typecast here! + metadataChoices.value = response.data as unknown as MetadataChoices } catch (error) { errors.value = (error as BackendError).backendErrors }