Bladeren bron

fix: name of settings field

chore/proposed-structure
Blaz Smehov 4 weken geleden
bovenliggende
commit
c3555a618f
1 gewijzigde bestanden met toevoegingen van 4 en 4 verwijderingen
  1. +4
    -4
      internal/pkg/redis/redis.go

+ 4
- 4
internal/pkg/redis/redis.go Bestand weergeven

@@ -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)
}


Laden…
Annuleren
Opslaan