mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
fix: don’t send edited miis with same images part 2
This commit is contained in:
parent
4a5126c87b
commit
d11f32eefb
1 changed files with 3 additions and 1 deletions
|
|
@ -135,7 +135,9 @@ export async function PATCH(request: NextRequest, { params }: { params: Promise<
|
|||
if (makeup !== undefined) updateData.makeup = makeup;
|
||||
if (instructions !== undefined) updateData.instructions = instructions;
|
||||
if (images.length > 0) updateData.imageCount = images.length;
|
||||
if (settings.queueEnabled || wasImagesModerated) updateData.in_queue = true;
|
||||
|
||||
const imagesChanged = images.length > 0 || miiPortraitImage || miiFeaturesImage;
|
||||
if ((settings.queueEnabled && imagesChanged) || wasImagesModerated) updateData.in_queue = true;
|
||||
|
||||
if (Object.keys(updateData).length === 0) return rateLimit.sendResponse({ error: "Nothing was changed" }, 400);
|
||||
const updatedMii = await prisma.mii.update({
|
||||
|
|
|
|||
Loading…
Reference in a new issue