generated from PenaSide/GolangTemplate
Merge branch 'dev' into 'staging'
fix: remove regexp from dto See merge request pena-services/customer!18
This commit is contained in:
commit
42bde9d633
@ -4,7 +4,6 @@ import (
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/fields"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/models"
|
||||
"penahub.gitlab.yandexcloud.net/pena-services/customer/pkg/bsontools"
|
||||
)
|
||||
|
||||
type GetHistories struct {
|
||||
@ -15,10 +14,7 @@ type GetHistories struct {
|
||||
func (receiver *GetHistories) BSON() bson.M {
|
||||
query := bson.M{
|
||||
fields.History.IsDeleted: false,
|
||||
}
|
||||
|
||||
if receiver.Type != nil {
|
||||
query[fields.History.Type] = bsontools.BuildCaseInsensitiveRegex(*receiver.Type)
|
||||
fields.History.Type: *receiver.Type,
|
||||
}
|
||||
|
||||
return query
|
||||
|
Loading…
Reference in New Issue
Block a user