Ver a proveniência

fix: name of settings field

chore/proposed-structure
Blaz Smehov há 4 semanas
ascendente
cometimento
c3555a618f
1 ficheiros alterados com 4 adições e 4 eliminações
  1. +4
    -4
      internal/pkg/redis/redis.go

+ 4
- 4
internal/pkg/redis/redis.go Ver ficheiro

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


Carregando…
Cancelar
Guardar