mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(admin/master): provider+master CRUD, token mgmt, logs APIs
This commit is contained in:
@@ -36,6 +36,7 @@ func (s *SyncService) SyncKey(key *model.Key) error {
|
||||
}
|
||||
|
||||
fields := map[string]interface{}{
|
||||
"id": key.ID,
|
||||
"master_id": key.MasterID,
|
||||
"issued_at_epoch": key.IssuedAtEpoch,
|
||||
"status": key.Status,
|
||||
@@ -260,6 +261,7 @@ 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{}{
|
||||
"id": k.ID,
|
||||
"master_id": k.MasterID,
|
||||
"issued_at_epoch": k.IssuedAtEpoch,
|
||||
"status": k.Status,
|
||||
|
||||
Reference in New Issue
Block a user