import { wipeTotem } from "@/app/www/logic/avatar"; import logIP from "@/app/www/media/logIP"; import validateMillis from "@/app/www/media/validateMillis"; import validateTotem from "@/app/www/media/validateTotem"; export const PATCH = logIP( validateMillis( validateTotem(async ({ headers }) => { return Response.json( { avatarID: headers.get("avatarID"), avatarName: headers.get("avatarName"), level: Number(headers.get("level")), fax: headers.get("fax"), avatarIntro: headers.get("avatarIntro"), }, { status: 201 }, ); }), ), ); export const DELETE = logIP( validateMillis( validateTotem(async ({ headers }) => { const totem = headers.get("totem") as string; const avatarID = headers.get("avatarID") as string; await wipeTotem(avatarID, totem); return new Response(undefined, { status: 204, }); }), ), );