mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-18 07:58:57 +00:00
로그인할 때마다 다른 디바이스에서 삭제된 파일을 스캔하여 현재 디바이스에서도 삭제하도록 구현
This commit is contained in:
11
src/routes/api/file/list/+server.ts
Normal file
11
src/routes/api/file/list/+server.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { json } from "@sveltejs/kit";
|
||||
import { authorize } from "$lib/server/modules/auth";
|
||||
import { fileListResponse, type FileListResponse } from "$lib/server/schemas";
|
||||
import { getFileList } from "$lib/server/services/file";
|
||||
import type { RequestHandler } from "./$types";
|
||||
|
||||
export const GET: RequestHandler = async ({ locals }) => {
|
||||
const { userId } = await authorize(locals, "activeClient");
|
||||
const { files } = await getFileList(userId);
|
||||
return json(fileListResponse.parse({ files } satisfies FileListResponse));
|
||||
};
|
||||
Reference in New Issue
Block a user