mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-08-08 15:03:42 +08:00
feat: add cleanup for unbound addresses feature (#739)
- Add unboundAddress cleanup type to backend cleanup logic - Update CleanupSettings model with unbound address fields - Add scheduled task for automatic unbound address cleanup - Add UI controls in admin Maintenance panel for manual cleanup - Add i18n support (en/zh) for unbound address cleanup labels - Clean addresses not bound to any user created before n days 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -251,6 +251,12 @@ export const cleanup = async (
|
||||
`created_at < datetime('now', '-${cleanDays} day')`
|
||||
)
|
||||
break;
|
||||
case "unboundAddress":
|
||||
await batchDeleteAddressWithData(
|
||||
c,
|
||||
`id NOT IN (SELECT address_id FROM users_address) AND created_at < datetime('now', '-${cleanDays} day')`
|
||||
)
|
||||
break;
|
||||
case "mails":
|
||||
await c.env.DB.prepare(`
|
||||
DELETE FROM raw_mails WHERE created_at < datetime('now', '-${cleanDays} day')`
|
||||
|
||||
Reference in New Issue
Block a user