From 56f52a3ab59b416939530aa8c1fb0dd5c3e8d098 Mon Sep 17 00:00:00 2001 From: KranjQ Date: Sun, 15 Dec 2024 23:18:32 +0300 Subject: [PATCH] fix --- cmd/main/main.go | 2 +- .../getcurrentprofile/handler_easyjson.go | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/cmd/main/main.go b/cmd/main/main.go index 9a4bd00..1675d53 100644 --- a/cmd/main/main.go +++ b/cmd/main/main.go @@ -305,7 +305,7 @@ func main() { } }() stopRefresh := make(chan bool) - refreshTicker := time.NewTicker(15 * time.Second) + refreshTicker := time.NewTicker(30 * time.Second) defer refreshTicker.Stop() go RefreshDailyLikes(ctx, paymentsClient, refreshTicker, stopRefresh) diff --git a/internal/pkg/personalities/delivery/http/getcurrentprofile/handler_easyjson.go b/internal/pkg/personalities/delivery/http/getcurrentprofile/handler_easyjson.go index 5ba7b94..53b3cb4 100644 --- a/internal/pkg/personalities/delivery/http/getcurrentprofile/handler_easyjson.go +++ b/internal/pkg/personalities/delivery/http/getcurrentprofile/handler_easyjson.go @@ -62,6 +62,12 @@ func easyjson888c126aDecodeGithubComGoParkMailRu20242SaraFunInternalPkgPersonali } in.Delim(']') } + case "money_balance": + out.MoneyBalance = int(in.Int()) + case "daily_likes_balance": + out.DailyLikesBalance = int(in.Int()) + case "purchased_likes_balance": + out.PurchasedLikesBalance = int(in.Int()) default: in.SkipRecursive() } @@ -97,6 +103,21 @@ func easyjson888c126aEncodeGithubComGoParkMailRu20242SaraFunInternalPkgPersonali out.RawByte(']') } } + { + const prefix string = ",\"money_balance\":" + out.RawString(prefix) + out.Int(int(in.MoneyBalance)) + } + { + const prefix string = ",\"daily_likes_balance\":" + out.RawString(prefix) + out.Int(int(in.DailyLikesBalance)) + } + { + const prefix string = ",\"purchased_likes_balance\":" + out.RawString(prefix) + out.Int(int(in.PurchasedLikesBalance)) + } out.RawByte('}') }