mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-12 11:23:52 +02:00
fix uncaught errors
This commit is contained in:
@@ -4,17 +4,21 @@ import { useAvatarStore, useWorldStore } from '../stores';
|
||||
const imageReq = {
|
||||
async uploadAvatarFailCleanup(id) {
|
||||
const avatarStore = useAvatarStore();
|
||||
const json = await request(`file/${id}`, {
|
||||
method: 'GET'
|
||||
});
|
||||
const fileId = json.id;
|
||||
const fileVersion = json.versions[json.versions.length - 1].version;
|
||||
request(`file/${fileId}/${fileVersion}/signature/finish`, {
|
||||
method: 'PUT'
|
||||
});
|
||||
request(`file/${fileId}/${fileVersion}/file/finish`, {
|
||||
method: 'PUT'
|
||||
});
|
||||
try {
|
||||
const json = await request(`file/${id}`, {
|
||||
method: 'GET'
|
||||
});
|
||||
const fileId = json.id;
|
||||
const fileVersion = json.versions[json.versions.length - 1].version;
|
||||
request(`file/${fileId}/${fileVersion}/signature/finish`, {
|
||||
method: 'PUT'
|
||||
}).catch(err => console.error('Failed to finish signature:', err));
|
||||
request(`file/${fileId}/${fileVersion}/file/finish`, {
|
||||
method: 'PUT'
|
||||
}).catch(err => console.error('Failed to finish file:', err));
|
||||
} catch (error) {
|
||||
console.error('Failed to cleanup avatar upload:', error);
|
||||
}
|
||||
avatarStore.avatarDialog.loading = false;
|
||||
},
|
||||
|
||||
@@ -131,17 +135,21 @@ const imageReq = {
|
||||
|
||||
async uploadWorldFailCleanup(id) {
|
||||
const worldStore = useWorldStore();
|
||||
const json = await request(`file/${id}`, {
|
||||
method: 'GET'
|
||||
});
|
||||
const fileId = json.id;
|
||||
const fileVersion = json.versions[json.versions.length - 1].version;
|
||||
request(`file/${fileId}/${fileVersion}/signature/finish`, {
|
||||
method: 'PUT'
|
||||
});
|
||||
request(`file/${fileId}/${fileVersion}/file/finish`, {
|
||||
method: 'PUT'
|
||||
});
|
||||
try {
|
||||
const json = await request(`file/${id}`, {
|
||||
method: 'GET'
|
||||
});
|
||||
const fileId = json.id;
|
||||
const fileVersion = json.versions[json.versions.length - 1].version;
|
||||
request(`file/${fileId}/${fileVersion}/signature/finish`, {
|
||||
method: 'PUT'
|
||||
}).catch(err => console.error('Failed to finish signature:', err));
|
||||
request(`file/${fileId}/${fileVersion}/file/finish`, {
|
||||
method: 'PUT'
|
||||
}).catch(err => console.error('Failed to finish file:', err));
|
||||
} catch (error) {
|
||||
console.error('Failed to cleanup world upload:', error);
|
||||
}
|
||||
worldStore.worldDialog.loading = false;
|
||||
},
|
||||
|
||||
|
||||
@@ -55,9 +55,14 @@
|
||||
groupName.value = props.grouphint;
|
||||
} else if (locObj.groupId) {
|
||||
groupName.value = locObj.groupId;
|
||||
getGroupName(locObj.groupId).then((name) => {
|
||||
groupName.value = name;
|
||||
});
|
||||
getGroupName(locObj.groupId)
|
||||
.then((name) => {
|
||||
groupName.value = name;
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to get group name:', error);
|
||||
groupName.value = '';
|
||||
});
|
||||
} else {
|
||||
groupName.value = '';
|
||||
}
|
||||
|
||||
@@ -562,9 +562,10 @@ export const useGalleryStore = defineStore('Gallery', () => {
|
||||
method: 'HEAD',
|
||||
redirect: 'follow'
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
console.error('Failed to check image availability:', error);
|
||||
return null;
|
||||
});
|
||||
if (response.status === 200) {
|
||||
if (response && response.status === 200) {
|
||||
state.previousImagesTable.push(image);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -247,6 +247,9 @@ export const useModerationStore = defineStore('Moderation', () => {
|
||||
}
|
||||
}
|
||||
deleteExpiredPlayerModerations();
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to load player/avatar moderations:', error);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user