--
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
MAIL_SENDER='quiz@pena.digital'
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_ACCESS_KEY=5CV77KVDUU9H0II9R24M
S3_SECRET_KEY=0W0m8DyvdAKRJnsAy6mB5zndQ7RouJBLhqhtThcu

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

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

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

@ -1,6 +1,7 @@
package senders
import (
"fmt"
"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 {
sanitizedData := sanitizeHTMLData(data)
fmt.Println("SANITIZED", sanitizedData)
text, err := generateTextFromTemplate(sanitizedData, emailTemplate)
if err != nil {
return err