You've already forked AstralRinth
forked from didirus/AstralRinth
Creator update hotfixes (#1531)
* Put image upload on v3 * Fix space encoding in search * Add safety to any iterables
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user