Date 관련 Zod 스키마 수정

z.coerce.date()가 아닌 z.string().datetime()을 사용하도록 변경하여, 번거롭더라도 버그를 줄일 수 있는 방향으로 수정하였습니다.
This commit is contained in:
static
2025-01-08 22:08:20 +09:00
parent 5f6894d953
commit d7396945df
10 changed files with 34 additions and 34 deletions

View File

@@ -20,6 +20,6 @@ export const POST: RequestHandler = async ({ request, cookies, params }) => {
if (!bodyZodRes.success) error(400, "Invalid request body");
const { dekVersion, name, nameIv } = bodyZodRes.data;
await renameDirectory(userId, id, dekVersion, name, nameIv);
await renameDirectory(userId, id, new Date(dekVersion), name, nameIv);
return text("Directory renamed", { headers: { "Content-Type": "text/plain" } });
};