fix: align admin behavior and Kratos integrations

This commit is contained in:
2026-08-14 14:14:51 +08:00
parent 8c4c6ba661
commit e0b0e1d8c8
123 changed files with 4334 additions and 1877 deletions
+9 -8
View File
@@ -17,21 +17,22 @@ import (
)
type emailRepo struct {
config *conf.AdminBackend
runtime *conf.Runtime
}
func NewEmailRepo(config *conf.AdminBackend) biz.EmailRepo {
if config == nil {
return &emailRepo{}
}
return &emailRepo{config: config}
func NewEmailRepo(runtime *conf.Runtime) biz.EmailRepo {
return &emailRepo{runtime: runtime}
}
func (r *emailRepo) email() *conf.AdminBackend_Email {
if r.config == nil {
if r.runtime == nil {
return nil
}
return r.config.Email
config := r.runtime.Admin()
if config == nil {
return nil
}
return config.Email
}
func (r *emailRepo) Enabled() bool {