mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-14 22:08:45 +00:00
누락된 썸네일 생성 기능 구현
This commit is contained in:
14
src/routes/(fullscreen)/settings/thumbnails/+page.ts
Normal file
14
src/routes/(fullscreen)/settings/thumbnails/+page.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { error } from "@sveltejs/kit";
|
||||
import { callPostApi } from "$lib/hooks";
|
||||
import type { MissingThumbnailFileScanResponse } from "$lib/server/schemas/file";
|
||||
import type { PageLoad } from "./$types";
|
||||
|
||||
export const load: PageLoad = async ({ fetch }) => {
|
||||
const res = await callPostApi("/api/file/scanMissingThumbnails", undefined, fetch);
|
||||
if (!res.ok) {
|
||||
error(500, "Internal server error");
|
||||
}
|
||||
|
||||
const { files }: MissingThumbnailFileScanResponse = await res.json();
|
||||
return { files };
|
||||
};
|
||||
Reference in New Issue
Block a user