Update answer.go

This commit is contained in:
Mikhail 2024-04-13 23:13:58 +00:00 committed by skeris
parent 5c23a0151e
commit 40d8b15b24

@ -3,7 +3,6 @@ package answer
import (
"context"
"database/sql"
"fmt"
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal/sqlcgen"
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/model"
)
@ -84,7 +83,7 @@ func (r *AnswerRepository) GetAllAnswersByQuizID(ctx context.Context, session st
}
for _, row := range rows {
if row.Questiontype == model.TypeFile {
/*if row.Questiontype == model.TypeFile {
fmt.Println("GALL", row.Qid, row.QuestionID, row.Content)
fileURL, err := r.answerMinio.GetAnswerURL(ctx, row.Qid.UUID.String(), row.QuestionID, row.Content.String)
if err != nil {
@ -92,7 +91,7 @@ func (r *AnswerRepository) GetAllAnswersByQuizID(ctx context.Context, session st
return nil, err
}
row.Content = sql.NullString{String: fmt.Sprintf("%s|%s", fileURL, row.Content.String), Valid: true}
}
}*/
resultAnswer := model.ResultAnswer{
Content: row.Content.String,