mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
refactor: 全局适配 ApiFamily/EndpointKind 结构化标识体系
将新的 (ApiFamily, EndpointKind) / `family:kind` 签名体系应用到整个代码库: - API Handlers: 所有 adapter/handler 使用新的签名格式 - Services: provider, model, usage, cache, auth 等服务层适配 - Database: ProviderEndpoint 新增 api_family/endpoint_kind 字段 - Frontend: Provider 管理、Usage 表格等组件适配 - Tests: 更新所有相关测试用例
This commit is contained in:
@@ -64,7 +64,9 @@ class EmailSenderService:
|
||||
"smtp_use_tls": SystemConfigService.get_config(db, "smtp_use_tls", default=True),
|
||||
"smtp_use_ssl": SystemConfigService.get_config(db, "smtp_use_ssl", default=False),
|
||||
"smtp_from_email": SystemConfigService.get_config(db, "smtp_from_email"),
|
||||
"smtp_from_name": SystemConfigService.get_config(db, "smtp_from_name", default="Aether"),
|
||||
"smtp_from_name": SystemConfigService.get_config(
|
||||
db, "smtp_from_name", default="Aether"
|
||||
),
|
||||
}
|
||||
return config
|
||||
|
||||
@@ -143,7 +145,11 @@ class EmailSenderService:
|
||||
|
||||
# 发送邮件
|
||||
return await EmailSenderService._send_email(
|
||||
config=config, to_email=to_email, subject=subject, html_body=html_body, text_body=text_body
|
||||
config=config,
|
||||
to_email=to_email,
|
||||
subject=subject,
|
||||
html_body=html_body,
|
||||
text_body=text_body,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -419,9 +419,7 @@ class EmailTemplate:
|
||||
return EmailTemplate.html_to_text(html)
|
||||
|
||||
@staticmethod
|
||||
def get_subject(
|
||||
template_type: str = "verification", db: Session | None = None
|
||||
) -> str:
|
||||
def get_subject(template_type: str = "verification", db: Session | None = None) -> str:
|
||||
"""
|
||||
获取邮件主题
|
||||
|
||||
|
||||
Reference in New Issue
Block a user