mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-12 15:52:39 +10:00
Merge branch 'develop' into more-fixes
This commit is contained in:
@ -570,6 +570,8 @@ const descriptionSaving = ref<number>(0);
|
|||||||
|
|
||||||
let savingTimeout: undefined | NodeJS.Timeout;
|
let savingTimeout: undefined | NodeJS.Timeout;
|
||||||
|
|
||||||
|
type PatchGameBody = Partial<Game>;
|
||||||
|
|
||||||
watch(descriptionHTML, (_v) => {
|
watch(descriptionHTML, (_v) => {
|
||||||
console.log(game.value.mDescription);
|
console.log(game.value.mDescription);
|
||||||
descriptionSaving.value = 1;
|
descriptionSaving.value = 1;
|
||||||
@ -582,7 +584,7 @@ watch(descriptionHTML, (_v) => {
|
|||||||
body: {
|
body: {
|
||||||
id: gameId,
|
id: gameId,
|
||||||
mDescription: game.value.mDescription,
|
mDescription: game.value.mDescription,
|
||||||
},
|
} satisfies PatchGameBody,
|
||||||
});
|
});
|
||||||
descriptionSaving.value = 0;
|
descriptionSaving.value = 0;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -627,7 +629,7 @@ async function updateBannerImage(id: string) {
|
|||||||
body: {
|
body: {
|
||||||
id: gameId,
|
id: gameId,
|
||||||
mBannerObjectId: id,
|
mBannerObjectId: id,
|
||||||
},
|
} satisfies PatchGameBody,
|
||||||
});
|
});
|
||||||
game.value.mBannerObjectId = mBannerObjectId;
|
game.value.mBannerObjectId = mBannerObjectId;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -654,7 +656,7 @@ async function updateCoverImage(id: string) {
|
|||||||
body: {
|
body: {
|
||||||
id: gameId,
|
id: gameId,
|
||||||
mCoverObjectId: id,
|
mCoverObjectId: id,
|
||||||
},
|
} satisfies PatchGameBody,
|
||||||
});
|
});
|
||||||
game.value.mCoverObjectId = mCoverObjectId;
|
game.value.mCoverObjectId = mCoverObjectId;
|
||||||
coreMetadataIconUrl.value = useObject(mCoverObjectId);
|
coreMetadataIconUrl.value = useObject(mCoverObjectId);
|
||||||
@ -730,7 +732,7 @@ async function updateImageCarousel() {
|
|||||||
body: {
|
body: {
|
||||||
id: gameId,
|
id: gameId,
|
||||||
mImageCarouselObjectIds: game.value.mImageCarouselObjectIds,
|
mImageCarouselObjectIds: game.value.mImageCarouselObjectIds,
|
||||||
},
|
} satisfies PatchGameBody,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
createModal(
|
createModal(
|
||||||
|
|||||||
@ -273,11 +273,14 @@ export class MetadataHandler {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we're successful
|
const object = await prisma.company.upsert({
|
||||||
await pullObjects();
|
where: {
|
||||||
|
metadataKey: {
|
||||||
const object = await prisma.company.create({
|
metadataSource: provider.source(),
|
||||||
data: {
|
metadataId: result.id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
create: {
|
||||||
metadataSource: provider.source(),
|
metadataSource: provider.source(),
|
||||||
metadataId: result.id,
|
metadataId: result.id,
|
||||||
metadataOriginalQuery: query,
|
metadataOriginalQuery: query,
|
||||||
@ -289,8 +292,15 @@ export class MetadataHandler {
|
|||||||
mBannerObjectId: result.banner,
|
mBannerObjectId: result.banner,
|
||||||
mWebsite: result.website,
|
mWebsite: result.website,
|
||||||
},
|
},
|
||||||
|
update: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (object.mLogoObjectId == result.logo) {
|
||||||
|
// We created, and didn't update
|
||||||
|
// So pull objects
|
||||||
|
await pullObjects();
|
||||||
|
}
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user