fixed lang being wrongly used
This commit is contained in:
4
main.go
4
main.go
@@ -687,7 +687,7 @@ func getMatchChat(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resp := map[string][]*utils.ChatResponse{}
|
resp := map[string][]*utils.ChatResponse{}
|
||||||
err = rdc.Get(context.Background(), fmt.Sprintf(utils.MatchChatCacheKey, matchId, lang), &resp)
|
err = rdc.Get(context.Background(), fmt.Sprintf(utils.MatchChatCacheKey, matchId, lang.String()), &resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tStats, err := db.Messages.Query().Where(messages.HasMatchPlayerWith(matchplayer.HasMatchesWith(match.ID(matchId)))).WithMatchPlayer().All(context.Background())
|
tStats, err := db.Messages.Query().Where(messages.HasMatchPlayerWith(matchplayer.HasMatchesWith(match.ID(matchId)))).WithMatchPlayer().All(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -734,7 +734,7 @@ func getMatchChat(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
err = rdc.Set(&cache.Item{
|
err = rdc.Set(&cache.Item{
|
||||||
Ctx: context.Background(),
|
Ctx: context.Background(),
|
||||||
Key: fmt.Sprintf(utils.MatchChatCacheKey, matchId, lang),
|
Key: fmt.Sprintf(utils.MatchChatCacheKey, matchId, lang.String()),
|
||||||
Value: resp,
|
Value: resp,
|
||||||
TTL: time.Hour * 24 * 30,
|
TTL: time.Hour * 24 * 30,
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user