mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 16:16:55 +00:00
파일 및 디렉터리 목록을 IndexedDB에 캐싱하도록 구현
This commit is contained in:
@@ -17,6 +17,7 @@ export const GET: RequestHandler = async ({ locals, params }) => {
|
||||
const { id } = zodRes.data;
|
||||
|
||||
const {
|
||||
parentId,
|
||||
mekVersion,
|
||||
encDek,
|
||||
dekVersion,
|
||||
@@ -28,6 +29,7 @@ export const GET: RequestHandler = async ({ locals, params }) => {
|
||||
} = await getFileInformation(userId, id);
|
||||
return json(
|
||||
fileInfoResponse.parse({
|
||||
parent: parentId,
|
||||
mekVersion,
|
||||
dek: encDek,
|
||||
dekVersion: dekVersion.toISOString(),
|
||||
|
||||
@@ -12,7 +12,7 @@ const parseFileMetadata = (userId: number, json: string) => {
|
||||
const zodRes = fileUploadRequest.safeParse(JSON.parse(json));
|
||||
if (!zodRes.success) error(400, "Invalid request body");
|
||||
const {
|
||||
parentId,
|
||||
parent,
|
||||
mekVersion,
|
||||
dek,
|
||||
dekVersion,
|
||||
@@ -32,7 +32,7 @@ const parseFileMetadata = (userId: number, json: string) => {
|
||||
|
||||
return {
|
||||
userId,
|
||||
parentId,
|
||||
parentId: parent,
|
||||
mekVersion,
|
||||
encDek: dek,
|
||||
dekVersion: new Date(dekVersion),
|
||||
|
||||
Reference in New Issue
Block a user