added to MessageGigaChat field AccountID
All checks were successful
Deploy / CreateImage (push) Successful in 2m46s
Deploy / ValidateConfig (push) Successful in 24s
Deploy / MigrateDatabase (push) Successful in 42s
Deploy / DeployService (push) Successful in 25s

This commit is contained in:
pasha1coil 2025-06-09 15:27:26 +03:00
parent 9284add98e
commit d2b54ef05c
2 changed files with 10 additions and 8 deletions

@ -52,10 +52,11 @@ func (p *Producer) ToMailNotify(ctx context.Context, message Message) error {
} }
type MessageGigaChat struct { type MessageGigaChat struct {
ID int64 `json:"id"` ID int64 `json:"id"`
QuizID int64 `json:"quiz_id"` QuizID int64 `json:"quiz_id"`
Sex int32 `json:"sex"` // 0 - female, 1 - male, 2 - not sex Sex int32 `json:"sex"` // 0 - female, 1 - male, 2 - not sex
Age string `json:"age"` Age string `json:"age"`
AccountID string `json:"account_id"`
} }
// todo очень плохое решение что у нас два клиента к кафке и два продюсера у которых два метода самовырубащих эти клиенты, как только перестанет быть костылем надо будет переписать на нормальную логику // todo очень плохое решение что у нас два клиента к кафке и два продюсера у которых два метода самовырубащих эти клиенты, как только перестанет быть костылем надо будет переписать на нормальную логику

@ -593,10 +593,11 @@ func (r *Quiz) CreateQuizAuditory(ctx *fiber.Ctx) error {
} }
err = r.producerGigaChat.ToGigaChatNotify(ctx.Context(), brokers.MessageGigaChat{ err = r.producerGigaChat.ToGigaChatNotify(ctx.Context(), brokers.MessageGigaChat{
ID: result, ID: result,
QuizID: quizID, QuizID: quizID,
Age: req.Age, Age: req.Age,
Sex: req.Sex, Sex: req.Sex,
AccountID: accountID,
}) })
if err != nil { if err != nil {
return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error()) return ctx.Status(fiber.StatusInternalServerError).SendString(err.Error())