Pārlūkot izejas kodu

fix: name of settings field

chore/proposed-structure
Blaz Smehov pirms 4 nedēļām
vecāks
revīzija
c3555a618f
1 mainītis faili ar 4 papildinājumiem un 4 dzēšanām
  1. +4
    -4
      internal/pkg/redis/redis.go

+ 4
- 4
internal/pkg/redis/redis.go Parādīt failu

@@ -77,11 +77,11 @@ func SaveLatestList(appCtx *model.AppContext, client *redis.Client, ctx context.
}

func SaveSettings(appCtx *model.AppContext, client *redis.Client, ctx context.Context) {
appCtx.LatestList.Lock.Lock()
data, _ := json.Marshal(appCtx.LatestList.LatestList)
appCtx.LatestList.Lock.Unlock()
appCtx.Settings.Lock.Lock()
data, _ := json.Marshal(appCtx.Settings.Settings)
appCtx.Settings.Lock.Unlock()

err := client.Set(ctx, "latestList", data, 0).Err()
err := client.Set(ctx, "settings", data, 0).Err()
if err != nil {
fmt.Println("error in saving to redis: ", err)
}


Notiek ielāde…
Atcelt
Saglabāt