Update CustomerResponse JSON Tags and Fix Comment in Tender Repository

- Changed BSON tags to JSON tags in the CustomerResponse struct to ensure proper serialization in API responses.
- Updated the comment in the buildSearchFilter method to correct a typo, enhancing clarity in the codebase.
This commit is contained in:
n.nakhostin
2025-09-08 14:32:57 +03:30
parent a76aa16cba
commit c06ea278c0
2 changed files with 13 additions and 13 deletions
+12 -12
View File
@@ -46,18 +46,18 @@ type CompanySummary struct {
// CustomerResponse represents the customer data sent in API responses
type CustomerResponse struct {
ID string `bson:"id"`
FullName *string `bson:"full_name"`
Username string `bson:"username"`
Email string `bson:"email"`
Password string `bson:"password"`
Status string `bson:"status"`
Type string `bson:"type"`
Phone *string `bson:"phone"`
CompanyIDs []string `bson:"company_ids"`
UpdatedAt int64 `bson:"updated_at"`
CreatedAt int64 `bson:"created_at"`
LastLoginAt *int64 `bson:"last_login_at"`
ID string `json:"id"`
FullName *string `json:"full_name"`
Username string `json:"username"`
Email string `json:"email"`
Password string `json:"password"`
Status string `json:"status"`
Type string `json:"type"`
Phone *string `json:"phone"`
CompanyIDs []string `json:"company_ids"`
UpdatedAt int64 `json:"updated_at"`
CreatedAt int64 `json:"created_at"`
LastLoginAt *int64 `json:"last_login_at"`
Companies []*CompanySummary `json:"companies"`
}
+1 -1
View File
@@ -417,7 +417,7 @@ func (r *tenderRepository) GetTenderCountByClassification(ctx context.Context) (
return counts, nil
}
// buildSearchFilter builds MongoDB filter from search vvvform
// buildSearchFilter builds MongoDB filter from search form
func (r *tenderRepository) buildSearchFilter(form *SearchForm) bson.M {
filter := bson.M{}