Skip to content

Commit

Permalink
fix: appLocks name on all_app_locks DB table (#1667)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-crespo-fdc authored Jun 11, 2024
1 parent 00ed46a commit 737a82a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,7 @@ type AllEnvLocksGo struct {
}

type AllAppLocksJson struct {
AppLocks []string `json:"envLocks"`
AppLocks []string `json:"appLocks"`
}

type AllAppLocksRow struct {
Expand Down Expand Up @@ -1923,8 +1923,8 @@ func (h *DBHandler) DBWriteAllAppLocks(ctx context.Context, transaction *sql.Tx,
span, _ := tracer.StartSpanFromContext(ctx, "DBWriteAllAppLocks")
defer span.Finish()
slices.Sort(lockIds) // we don't really *need* the sorting, it's just for convenience
jsonToInsert, err := json.Marshal(AllEnvLocksJson{
EnvLocks: lockIds,
jsonToInsert, err := json.Marshal(AllAppLocksJson{
AppLocks: lockIds,
})
if err != nil {
return fmt.Errorf("could not marshal json data: %w", err)
Expand Down

0 comments on commit 737a82a

Please sign in to comment.