replace faker
This commit is contained in:
parent
a74a149d06
commit
b31c3a81c6
@ -4,7 +4,6 @@ import (
|
|||||||
"codeword/internal/models"
|
"codeword/internal/models"
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/pioz/faker"
|
|
||||||
"go.mongodb.org/mongo-driver/bson"
|
"go.mongodb.org/mongo-driver/bson"
|
||||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
@ -58,8 +57,6 @@ func NewPromoCodeRepository(mdb *mongo.Collection) *PromoCodeRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *PromoCodeRepository) CreatePromoCode(ctx context.Context, req *models.PromoCode) (*models.PromoCode, error) {
|
func (r *PromoCodeRepository) CreatePromoCode(ctx context.Context, req *models.PromoCode) (*models.PromoCode, error) {
|
||||||
|
|
||||||
req.Codeword = req.Codeword + faker.String()
|
|
||||||
req.CreatedAt = time.Now()
|
req.CreatedAt = time.Now()
|
||||||
req.ID = primitive.NewObjectID()
|
req.ID = primitive.NewObjectID()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user