mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-11 18:10:01 +08:00
Add new workflow action and Fix cleanup bug (#355)
* Create frontend_pagefunction_deploy.yaml * Update frontend_pagefunction_deploy.yaml * Update cleanup_api.ts * Update common.ts * Update cleanup_api.ts * Update common.ts
This commit is contained in:
@@ -78,7 +78,7 @@ export const cleanup = async (
|
||||
cleanType: string | undefined | null,
|
||||
cleanDays: number | undefined | null
|
||||
): Promise<boolean> => {
|
||||
if (!cleanType || !cleanDays || cleanDays < 0 || cleanDays > 30) {
|
||||
if (!cleanType || typeof cleanDays !== 'number' || cleanDays < 0 || cleanDays > 30) {
|
||||
throw new Error("Invalid cleanType or cleanDays")
|
||||
}
|
||||
console.log(`Cleanup ${cleanType} before ${cleanDays} days`);
|
||||
|
||||
Reference in New Issue
Block a user