update amorepo init
This commit is contained in:
parent
38cdac154b
commit
f1d3073dc9
@ -137,6 +137,7 @@ type AmoDal struct {
|
||||
queries *sqlcgen.Queries
|
||||
AmoRepo *amo.AmoRepository
|
||||
QuestionRepo *question.QuestionRepository
|
||||
AnswerRepo *answer.AnswerRepository
|
||||
}
|
||||
|
||||
func NewAmoDal(ctx context.Context, cred string) (*AmoDal, error) {
|
||||
@ -164,11 +165,17 @@ func NewAmoDal(ctx context.Context, cred string) (*AmoDal, error) {
|
||||
Pool: pool,
|
||||
})
|
||||
|
||||
answerRepo := answer.NewAnswerRepository(answer.Deps{
|
||||
Queries: queries,
|
||||
Pool: pool,
|
||||
})
|
||||
|
||||
return &AmoDal{
|
||||
conn: pool,
|
||||
queries: queries,
|
||||
AmoRepo: amoRepo,
|
||||
QuestionRepo: questionRepo,
|
||||
AnswerRepo: answerRepo,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -83,6 +83,7 @@ func (r *AnswerRepository) GetAllAnswersByQuizID(ctx context.Context, session st
|
||||
}
|
||||
|
||||
for _, row := range rows {
|
||||
//todo тут забыл добавить проверку на то что minio !=nil
|
||||
/*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)
|
||||
|
Loading…
Reference in New Issue
Block a user