mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-10 04:22:09 +10:00
fix: editing game image metadata in admin panel
This commit is contained in:
@ -10,7 +10,8 @@
|
||||
class="flex flex-col lg:flex-row lg:justify-between items-start lg:items-center gap-2"
|
||||
>
|
||||
<div class="inline-flex items-center gap-4">
|
||||
<img :src="useObject(game.mIconObjectId)" class="size-20" />
|
||||
<!-- cover image -->
|
||||
<img :src="coreMetadataIconUrl" class="size-20" />
|
||||
<div>
|
||||
<h1 class="text-5xl font-bold font-display text-zinc-100">
|
||||
{{ game.mName }}
|
||||
@ -285,7 +286,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<UploadFileDialog
|
||||
@ -626,7 +626,7 @@ async function updateBannerImage(id: string) {
|
||||
method: "PATCH",
|
||||
body: {
|
||||
id: gameId,
|
||||
mBannerId: id,
|
||||
mBannerObjectId: id,
|
||||
},
|
||||
});
|
||||
game.value.mBannerObjectId = mBannerObjectId;
|
||||
@ -653,10 +653,11 @@ async function updateCoverImage(id: string) {
|
||||
method: "PATCH",
|
||||
body: {
|
||||
id: gameId,
|
||||
mCoverId: id,
|
||||
mCoverObjectId: id,
|
||||
},
|
||||
});
|
||||
game.value.mCoverObjectId = mCoverObjectId;
|
||||
coreMetadataIconUrl.value = useObject(mCoverObjectId);
|
||||
} catch (e) {
|
||||
createModal(
|
||||
ModalType.Notification,
|
||||
@ -708,8 +709,6 @@ async function uploadAfterImageUpload(result: Game) {
|
||||
game.value.mImageLibraryObjectIds = result.mImageLibraryObjectIds;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function addImageToCarousel(id: string) {
|
||||
showAddCarouselModal.value = false;
|
||||
game.value.mImageCarouselObjectIds.push(id);
|
||||
@ -730,7 +729,7 @@ async function updateImageCarousel() {
|
||||
method: "PATCH",
|
||||
body: {
|
||||
id: gameId,
|
||||
mImageCarousel: game.value.mImageCarouselObjectIds,
|
||||
mImageCarouselObjectIds: game.value.mImageCarouselObjectIds,
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
@ -16,9 +16,7 @@ export default defineEventHandler<{
|
||||
|
||||
const body = DeleteGameImage(await readBody(h3));
|
||||
if (body instanceof type.errors) {
|
||||
// hover out.summary to see validation errors
|
||||
console.error(body.summary);
|
||||
|
||||
console.error(h3.path, body.summary);
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: body.summary,
|
||||
|
||||
Reference in New Issue
Block a user