Creator update hotfixes (#1531)

* Put image upload on v3

* Fix space encoding in search

* Add safety to any iterables
This commit is contained in:
Carter
2024-01-07 14:28:51 -08:00
committed by GitHub
parent 1af0aa3f57
commit 9dcb90a9cf
3 changed files with 19 additions and 25 deletions

View File

@@ -31,7 +31,8 @@ export const useImageUpload = async (file: File, ctx: ImageUploadContext) => {
const response = (await useBaseFetch(url, {
method: 'POST',
body: file,
})) as ImageUploadResponse // TODO: zod or object validation
apiVersion: 3,
})) as ImageUploadResponse
// Type check to see if response has a url property and an id property
if (!response?.id || typeof response.id !== 'string') {