mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-05-13 13:17:45 +00:00
fix: custom images should be sent even if moderated
This commit is contained in:
parent
6fd51e9f07
commit
5b8f2dbbbe
2 changed files with 6 additions and 12 deletions
|
|
@ -103,12 +103,9 @@ export async function PATCH(request: NextRequest, { params }: { params: Promise<
|
||||||
for (const img of [image1, image2, image3]) {
|
for (const img of [image1, image2, image3]) {
|
||||||
if (!img) continue;
|
if (!img) continue;
|
||||||
|
|
||||||
const imageValidation = await validateImage(img);
|
const validation = await validateImage(img);
|
||||||
if (imageValidation.valid) {
|
if (!validation.valid) wasImagesModerated = true;
|
||||||
images.push(img);
|
images.push(img);
|
||||||
} else {
|
|
||||||
wasImagesModerated = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Mii portrait & features image (Switch)
|
// Check Mii portrait & features image (Switch)
|
||||||
|
|
|
||||||
|
|
@ -159,12 +159,9 @@ export async function POST(request: NextRequest) {
|
||||||
for (const img of [image1, image2, image3]) {
|
for (const img of [image1, image2, image3]) {
|
||||||
if (!img) continue;
|
if (!img) continue;
|
||||||
|
|
||||||
const imageValidation = await validateImage(img);
|
const validation = await validateImage(img);
|
||||||
if (imageValidation.valid) {
|
if (!validation.valid) wasImagesModerated = true;
|
||||||
customImages.push(img);
|
customImages.push(img);
|
||||||
} else {
|
|
||||||
wasImagesModerated = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Mii portrait & features image (Switch)
|
// Check Mii portrait & features image (Switch)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue