add minioClient to answer Repo
This commit is contained in:
parent
a7f632c441
commit
4f61bc17b0
@ -58,10 +58,10 @@ func New(ctx context.Context, cred string, authClient *auth.AuthClient, minioCli
|
||||
Pool: pool,
|
||||
})
|
||||
|
||||
storerAnswer := &StorerAnswer{}
|
||||
storerAnswer := &answer.StorerAnswer{}
|
||||
|
||||
if minioClient != nil {
|
||||
storerAnswer, err = NewAnswerMinio(ctx, minioClient)
|
||||
storerAnswer, err = answer.NewAnswerMinio(ctx, minioClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal"
|
||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/dal/sqlcgen"
|
||||
"penahub.gitlab.yandexcloud.net/backend/quiz/common.git/model"
|
||||
)
|
||||
@ -12,13 +11,13 @@ import (
|
||||
type Deps struct {
|
||||
Queries *sqlcgen.Queries
|
||||
Pool *sql.DB
|
||||
AnswerMinio *dal.StorerAnswer
|
||||
AnswerMinio *StorerAnswer
|
||||
}
|
||||
|
||||
type AnswerRepository struct {
|
||||
queries *sqlcgen.Queries
|
||||
pool *sql.DB
|
||||
answerMinio *dal.StorerAnswer
|
||||
answerMinio *StorerAnswer
|
||||
}
|
||||
|
||||
func NewAnswerRepository(deps Deps) *AnswerRepository {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package dal
|
||||
package answer
|
||||
|
||||
import (
|
||||
"context"
|
Loading…
Reference in New Issue
Block a user