feat: add back edit page and fix profile settings

This commit is contained in:
trafficlunar 2026-04-18 18:25:10 +01:00
parent e81f054e3a
commit 63dbaf13fa
31 changed files with 1246 additions and 1292 deletions

View file

@ -14,7 +14,7 @@ import { idSchema, nameSchema, switchMiiInstructionsSchema, tagsSchema } from "@
import { generateMetadataImage, validateImage } from "@/lib/images";
import { RateLimit } from "@/lib/rate-limit";
import { minifyInstructions, SwitchMiiInstructions } from "@tomodachi-share/shared";
import { settings } from "@/lib/settings";
import { settings } from "../../../../../lib/settings";
const uploadsDirectory = path.join(process.cwd(), "uploads", "mii");
@ -41,7 +41,7 @@ const editSchema = z.object({
image3: z.union([z.instanceof(File), z.any()]).optional(),
});
export async function PATCH(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
export async function POST(request: NextRequest, { params }: { params: Promise<{ id: string }> }) {
const session = await auth();
if (!session) return NextResponse.json({ error: "Unauthorized" }, { status: 401 });