feat: support cleanDays max 1000 (#622)

This commit is contained in:
Dream Hunter
2025-04-07 19:24:21 +08:00
committed by GitHub
parent 525f5e2dce
commit 91a859bbcf
10 changed files with 2378 additions and 2708 deletions

View File

@@ -151,7 +151,7 @@ export const cleanup = async (
cleanType: string | undefined | null,
cleanDays: number | undefined | null
): Promise<boolean> => {
if (!cleanType || typeof cleanDays !== 'number' || cleanDays < 0 || cleanDays > 30) {
if (!cleanType || typeof cleanDays !== 'number' || cleanDays < 0 || cleanDays > 1000) {
throw new Error("Invalid cleanType or cleanDays")
}
console.log(`Cleanup ${cleanType} before ${cleanDays} days`);