fixed db installation
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"github.com/tech/sendico/pkg/auth"
|
||||
"github.com/tech/sendico/pkg/db/paymethod"
|
||||
"github.com/tech/sendico/pkg/db/policy"
|
||||
"github.com/tech/sendico/pkg/db/repository"
|
||||
"github.com/tech/sendico/pkg/mlogger"
|
||||
"github.com/tech/sendico/pkg/model"
|
||||
"github.com/tech/sendico/pkg/mservice"
|
||||
@@ -16,8 +15,7 @@ import (
|
||||
type RecipientDB struct {
|
||||
auth.ProtectedDBImp[*model.Recipient]
|
||||
auth.ArchivableDB[*model.Recipient]
|
||||
pmdb paymethod.DB
|
||||
paymentMethodsRepo repository.Repository
|
||||
pmdb paymethod.DB
|
||||
}
|
||||
|
||||
func Create(ctx context.Context,
|
||||
@@ -27,7 +25,7 @@ func Create(ctx context.Context,
|
||||
pmdb paymethod.DB,
|
||||
db *mongo.Database,
|
||||
) (*RecipientDB, error) {
|
||||
p, err := auth.CreateDBImp[*model.Recipient](ctx, logger, pdb, enforcer, mservice.Organizations, db)
|
||||
p, err := auth.CreateDBImp[*model.Recipient](ctx, logger, pdb, enforcer, mservice.Recipients, db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -49,8 +47,7 @@ func Create(ctx context.Context,
|
||||
createEmpty,
|
||||
getArchivable,
|
||||
),
|
||||
paymentMethodsRepo: repository.CreateMongoRepository(db, string(mservice.PaymentMethods)),
|
||||
pmdb: pmdb,
|
||||
pmdb: pmdb,
|
||||
}
|
||||
return res, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user