소스 검색

fix: name of settings field

chore/proposed-structure
Blaz Smehov 4 주 전
부모
커밋
c3555a618f
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. +4
    -4
      internal/pkg/redis/redis.go

+ 4
- 4
internal/pkg/redis/redis.go 파일 보기

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


불러오는 중...
취소
저장