--
All checks were successful
Deploy / CreateImage (push) Successful in 3m41s
Deploy / DeployService (push) Successful in 29s

This commit is contained in:
skeris 2025-09-21 16:18:25 +03:00
parent 2ce3cf0d26
commit 9226f8cd70
5 changed files with 6 additions and 2 deletions

@ -11,7 +11,7 @@ REDIS_PASSWORD='Redalert2'
REDIS_DB=2 REDIS_DB=2
MAIL_SENDER='quiz@pena.digital' MAIL_SENDER='quiz@pena.digital'
MAIL_API_KEY='8tv2xcsfCMBX3TCQxzgeeEwAEYyQrPUp0ggw' MAIL_API_KEY='8tv2xcsfCMBX3TCQxzgeeEwAEYyQrPUp0ggw'
CUSTOMER_MICROSERVICE_RPC_URL='10.8.0.226:9066' CUSTOMER_MICROSERVICE_RPC_URL='10.8.0.226:9065'
S3_ENDPOINT=s3.timeweb.cloud S3_ENDPOINT=s3.timeweb.cloud
S3_ACCESS_KEY=5CV77KVDUU9H0II9R24M S3_ACCESS_KEY=5CV77KVDUU9H0II9R24M
S3_SECRET_KEY=0W0m8DyvdAKRJnsAy6mB5zndQ7RouJBLhqhtThcu S3_SECRET_KEY=0W0m8DyvdAKRJnsAy6mB5zndQ7RouJBLhqhtThcu

@ -77,7 +77,7 @@
</td> </td>
</tr> </tr>
{{ if .Quiz }} {{ if .QuizID }}
<tr> <tr>
<td colspan="2" style="height: 100%"> <td colspan="2" style="height: 100%">
<a <a

@ -381,6 +381,7 @@ func (w *SendToClient) ProcessMessageToClient(ctx context.Context, constructData
theme := constructData.QuizConfig.Mailing.Theme theme := constructData.QuizConfig.Mailing.Theme
constructData.QuizConfig.Mailing.Theme = constructData.QuizConfig.Mailing.Reply constructData.QuizConfig.Mailing.Theme = constructData.QuizConfig.Mailing.Reply
fmt.Println("QUIZID", constructData.Quiz, constructData.Quiz.Id)
data := senders.TemplateData{ data := senders.TemplateData{
QuizConfig: constructData.QuizConfig.Mailing, QuizConfig: constructData.QuizConfig.Mailing,

@ -46,6 +46,7 @@ func generateTextFromTemplate(data TemplateData, tpl string) (string, error) {
AllAnswers: data.AllAnswers, AllAnswers: data.AllAnswers,
QuestionsMap: data.QuestionsMap, QuestionsMap: data.QuestionsMap,
AnswerTime: data.AnswerTime, AnswerTime: data.AnswerTime,
QuizID: data.QuizID,
}); err != nil { }); err != nil {
return "", fmt.Errorf("error executing template: %w", err) return "", fmt.Errorf("error executing template: %w", err)
} }

@ -1,6 +1,7 @@
package senders package senders
import ( import (
"fmt"
"gitea.pena/SQuiz/common/clients" "gitea.pena/SQuiz/common/clients"
) )
@ -23,6 +24,7 @@ func (m *MailLeadSender) SendLead(data LeadData) error {
func (m *MailLeadSender) SendMailWithAttachment(recipient, subject string, emailTemplate string, data TemplateData, attachments []clients.Attachment) error { func (m *MailLeadSender) SendMailWithAttachment(recipient, subject string, emailTemplate string, data TemplateData, attachments []clients.Attachment) error {
sanitizedData := sanitizeHTMLData(data) sanitizedData := sanitizeHTMLData(data)
fmt.Println("SANITIZED", sanitizedData)
text, err := generateTextFromTemplate(sanitizedData, emailTemplate) text, err := generateTextFromTemplate(sanitizedData, emailTemplate)
if err != nil { if err != nil {
return err return err