feat(邮件通知): 添加可自定义的邮件模板功能
支持在后台设置中配置管理员通知和回复通知的邮件模板 添加默认模板和恢复默认模板功能 更新相关API以支持模板的存储和使用
This commit is contained in:
@@ -184,10 +184,12 @@ app.put('/admin/settings/email-notify', async (c) => {
|
||||
const globalEnabled =
|
||||
typeof body.globalEnabled === 'boolean' ? body.globalEnabled : undefined;
|
||||
const smtp = body.smtp && typeof body.smtp === 'object' ? body.smtp : undefined;
|
||||
const templates = body.templates && typeof body.templates === 'object' ? body.templates : undefined;
|
||||
|
||||
await saveEmailNotificationSettings(c.env, {
|
||||
globalEnabled,
|
||||
smtp
|
||||
smtp,
|
||||
templates
|
||||
});
|
||||
|
||||
return c.json({ message: '保存成功' });
|
||||
|
||||
Reference in New Issue
Block a user