mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 15:08:46 +00:00
Date 관련 Zod 스키마 수정
z.coerce.date()가 아닌 z.string().datetime()을 사용하도록 변경하여, 번거롭더라도 버그를 줄일 수 있는 방향으로 수정하였습니다.
This commit is contained in:
@@ -33,7 +33,7 @@ export const requestDirectoryCreation = async (
|
||||
parentId,
|
||||
mekVersion: masterKey.version,
|
||||
dek: await wrapDataKey(dataKey, masterKey.key),
|
||||
dekVersion: dataKeyVersion,
|
||||
dekVersion: dataKeyVersion.toISOString(),
|
||||
name: encodeToBase64(nameEncrypted.ciphertext),
|
||||
nameIv: nameEncrypted.iv,
|
||||
});
|
||||
@@ -52,7 +52,7 @@ export const requestFileUpload = (file: File, parentId: "root" | number, masterK
|
||||
parentId,
|
||||
mekVersion: masterKey.version,
|
||||
dek: await wrapDataKey(dataKey, masterKey.key),
|
||||
dekVersion: dataKeyVersion,
|
||||
dekVersion: dataKeyVersion.toISOString(),
|
||||
contentType: file.type,
|
||||
contentIv: fileEncrypted.iv,
|
||||
name: nameEncrypted.ciphertext,
|
||||
@@ -85,13 +85,13 @@ export const requestDirectoryEntryRename = async (
|
||||
|
||||
if (entry.type === "directory") {
|
||||
await callPostApi<DirectoryRenameRequest>(`/api/directory/${entry.id}/rename`, {
|
||||
dekVersion: entry.dataKeyVersion,
|
||||
dekVersion: entry.dataKeyVersion.toISOString(),
|
||||
name: newNameEncrypted.ciphertext,
|
||||
nameIv: newNameEncrypted.iv,
|
||||
});
|
||||
} else {
|
||||
await callPostApi<FileRenameRequest>(`/api/file/${entry.id}/rename`, {
|
||||
dekVersion: entry.dataKeyVersion,
|
||||
dekVersion: entry.dataKeyVersion.toISOString(),
|
||||
name: newNameEncrypted.ciphertext,
|
||||
nameIv: newNameEncrypted.iv,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user