로그인할 때마다 다른 디바이스에서 삭제된 파일을 스캔하여 현재 디바이스에서도 삭제하도록 구현

This commit is contained in:
static
2025-07-12 03:27:49 +09:00
parent fa7ba451c3
commit eda5ff7570
10 changed files with 56 additions and 1 deletions

View 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));
};