mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-14 02:37:52 +00:00
style(core): align struct tags and fields
Standardize alignment of struct tags in models and field assignments in services for better readability. Additionally, include the Binding model in the test database auto-migration.
This commit is contained in:
@@ -35,11 +35,11 @@ func (s *SyncService) SyncKey(key *model.Key) error {
|
||||
}
|
||||
|
||||
fields := map[string]interface{}{
|
||||
"master_id": key.MasterID,
|
||||
"issued_at_epoch": key.IssuedAtEpoch,
|
||||
"status": key.Status,
|
||||
"group": key.Group,
|
||||
"scopes": key.Scopes,
|
||||
"master_id": key.MasterID,
|
||||
"issued_at_epoch": key.IssuedAtEpoch,
|
||||
"status": key.Status,
|
||||
"group": key.Group,
|
||||
"scopes": key.Scopes,
|
||||
"default_namespace": key.DefaultNamespace,
|
||||
"namespaces": key.Namespaces,
|
||||
}
|
||||
@@ -259,11 +259,11 @@ func (s *SyncService) SyncAll(db *gorm.DB) error {
|
||||
return fmt.Errorf("token hash missing for key %d", k.ID)
|
||||
}
|
||||
pipe.HSet(ctx, fmt.Sprintf("auth:token:%s", tokenHash), map[string]interface{}{
|
||||
"master_id": k.MasterID,
|
||||
"issued_at_epoch": k.IssuedAtEpoch,
|
||||
"status": k.Status,
|
||||
"group": k.Group,
|
||||
"scopes": k.Scopes,
|
||||
"master_id": k.MasterID,
|
||||
"issued_at_epoch": k.IssuedAtEpoch,
|
||||
"status": k.Status,
|
||||
"group": k.Group,
|
||||
"scopes": k.Scopes,
|
||||
"default_namespace": k.DefaultNamespace,
|
||||
"namespaces": k.Namespaces,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user