refactor(email): 简化邮件通知设置逻辑

移除adminEnabled和userEnabled配置,仅保留globalEnabled控制邮件通知
更新相关API、数据库操作及邮件发送逻辑以适配简化后的配置
This commit is contained in:
anghunk
2026-01-20 11:47:43 +08:00
parent ee31e98dee
commit 398daa9a11
5 changed files with 46 additions and 102 deletions

View File

@@ -42,8 +42,6 @@ export type CommentSettingsResponse = {
export type EmailNotifySettingsResponse = {
globalEnabled: boolean;
adminEnabled: boolean;
userEnabled: boolean;
};
export async function loginAdmin(name: string, password: string): Promise<string> {
@@ -83,8 +81,6 @@ export function fetchEmailNotifySettings(): Promise<EmailNotifySettingsResponse>
export function saveEmailNotifySettings(data: {
globalEnabled?: boolean;
adminEnabled?: boolean;
userEnabled?: boolean;
}): Promise<{ message: string }> {
return put<{ message: string }>('/admin/settings/email-notify', data);
}

View File

@@ -8,7 +8,7 @@
href="https://cwd-comments-docs.zishu.me"
target="_blank"
>
文档
使用文档
</a>
<a
class="layout-button"