feat: follow lite forum updates

This commit is contained in:
lezi-fun committed 2026-10-01 14:10:12 +08:00
1 parent f59739e36f
commit b42944b687
38 files changed
+1433 -71

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import pool from '@/lib/db';
import { getUser, requireAdmin } from '@/lib/auth';
export async function DELETE(req) {
const forbidden = await requireAdmin(getUser(req));
if (forbidden) return forbidden;
try {
await pool.query(`INSERT INTO settings (key, value) VALUES ('smtp_password', '')
ON CONFLICT (key) DO UPDATE SET value = '', updated_at = now()`);
return Response.json({ success: true });
} catch {
return Response.json({ error: '清除失败,请稍后重试' }, { status: 500 });
}
}