fix(front): [WIP] override wrong generated type for `get uploads` response
This commit is contained in:
		
							parent
							
								
									180d23ab7c
								
							
						
					
					
						commit
						9fbc1bfd09
					
				|  | @ -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<paths['/api/v2/channels/metadata-choices/']['get']['responses']['200']['content']['application/json']>('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 | ||||
|   } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 upsiflu
						upsiflu