리다이렉트 경로 처리, 파일 정보 변환, 상태 표시 UI 등 중복된 코드를 통합하고 모듈 간 순환 의존성 및 계층 위반 해소

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
staticandClaude Opus 5.5 committed 2026-10-12 08:51:07 +09:00
1 parent 9119c21881
commit 5b8621e524
96 files changed
+452 -548

No files matched your search

+6 -5
View File
@@ -1,9 +1,10 @@
import { defineParams } from "@sveltejs/kit/params";
const matchThumbnail = (param: string) => {
return param === "thumbnail";
};
export const params = defineParams({
thumbnail: (param) => (matchThumbnail(param) ? param : undefined),
// Positive integers such as the ids of files, directories, and categories
int: (param) => {
const value = Number(param);
return /^[1-9]\d*$/.test(param) && Number.isSafeInteger(value) ? value : undefined;
},
thumbnail: (param) => (param === "thumbnail" ? param : undefined),
});