mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 21:27:46 +00:00
feat: editing miis should be sent to queue
This commit is contained in:
parent
926dd9dd6b
commit
f30f12d086
1 changed files with 2 additions and 1 deletions
|
|
@ -16,6 +16,7 @@ import { generateMetadataImage, validateImage } from "@/lib/images";
|
|||
import { RateLimit } from "@/lib/rate-limit";
|
||||
import { SwitchMiiInstructions } from "@/types";
|
||||
import { minifyInstructions } from "@/lib/switch";
|
||||
import { settings } from "@/lib/settings";
|
||||
|
||||
const uploadsDirectory = path.join(process.cwd(), "uploads", "mii");
|
||||
|
||||
|
|
@ -134,7 +135,7 @@ 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 (wasImagesModerated) updateData.in_queue = true;
|
||||
if (settings.queueEnabled || 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