mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-05 15:26:36 +08:00
fix lint
This commit is contained in:
@@ -19,6 +19,16 @@ const (
|
||||
AuthSourceTypeOIDC = "oidc"
|
||||
)
|
||||
|
||||
// Shared GORM column name constants used across model package.
|
||||
const (
|
||||
colName = "name"
|
||||
colEnabled = "enabled"
|
||||
colRemark = "remark"
|
||||
tableOfProxyRoutes = "of_proxy_routes"
|
||||
optionKeyUptimeKumaPassword = "UptimeKumaPassword"
|
||||
optionValueTrue = "true"
|
||||
)
|
||||
|
||||
var authSourceNamePattern = regexp.MustCompile(`^[A-Za-z0-9][A-Za-z0-9_-]{0,79}$`)
|
||||
|
||||
// AuthSource 认证源实体
|
||||
@@ -192,7 +202,7 @@ func UpdateAuthSource(ctx context.Context, source *AuthSource, keepSecret bool)
|
||||
return err
|
||||
}
|
||||
return db.DB(ctx).Model(¤t).Updates(map[string]any{
|
||||
"name": source.Name,
|
||||
colName: source.Name,
|
||||
"type": source.Type,
|
||||
"display_name": source.DisplayName,
|
||||
"is_active": source.IsActive,
|
||||
|
||||
Reference in New Issue
Block a user