feat(api): add log settings management with auto-clear and clear days configuration
This commit is contained in:
@@ -19,6 +19,7 @@ type customSystemLogicModel interface {
|
||||
GetTosConfig(ctx context.Context) ([]*System, error)
|
||||
GetCurrencyConfig(ctx context.Context) ([]*System, error)
|
||||
GetVerifyCodeConfig(ctx context.Context) ([]*System, error)
|
||||
GetLogConfig(ctx context.Context) ([]*System, error)
|
||||
UpdateNodeMultiplierConfig(ctx context.Context, config string) error
|
||||
FindNodeMultiplierConfig(ctx context.Context) (*System, error)
|
||||
}
|
||||
@@ -152,3 +153,12 @@ func (m *customSystemModel) GetVerifyCodeConfig(ctx context.Context) ([]*System,
|
||||
})
|
||||
return configs, err
|
||||
}
|
||||
|
||||
// GetLogConfig returns the log config.
|
||||
func (m *customSystemModel) GetLogConfig(ctx context.Context) ([]*System, error) {
|
||||
var configs []*System
|
||||
err := m.QueryNoCacheCtx(ctx, &configs, func(conn *gorm.DB, v interface{}) error {
|
||||
return conn.Where("`category` = ?", "log").Find(v).Error
|
||||
})
|
||||
return configs, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user