Skip to content

Commit

Permalink
Merge pull request #23 from solufit/22-fix-create-cache-issue
Browse files Browse the repository at this point in the history
Refactor cache creation to handle string conversion for object_id and…
  • Loading branch information
Walkmana-25 authored Oct 6, 2024
2 parents a82555f + 07d31ec commit 3dbe153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ func CreateCache(redisClient *redis.Client, anemosData []interface{}) error {
// 一週間分のキャッシュデータを作成する
for _, data := range anemosData {
dataMap := data.(map[string]interface{})
var object_id Id = dataMap["info_objectId"].(Id)
var object_type EventType = dataMap["object_type"].(EventType)
var object_id Id = Id(dataMap["info_objectId"].(string))
var object_type EventType = EventType(dataMap["object_type"].(string))

// objectidをキーにして、データを保存する
target_data[object_id] = dataMap["data"].(string)
Expand Down

0 comments on commit 3dbe153

Please sign in to comment.