Update Query Parameter Names in Customer and User Forms
- Changed the query parameter name from `search` to `q` in both SearchCustomersForm and ListUsersForm for consistency across API endpoints. - This update enhances clarity in the API's query structure, aligning with common practices for search parameters.
This commit is contained in:
@@ -32,7 +32,7 @@ type UpdateStatusForm struct {
|
||||
|
||||
// ListCustomersForm represents the form for listing customers with filters
|
||||
type SearchCustomersForm struct {
|
||||
Search *string `query:"search" valid:"optional"`
|
||||
Search *string `query:"q" valid:"optional"`
|
||||
Type *string `query:"type" valid:"optional,in(individual|company|government)"`
|
||||
Status *string `query:"status" valid:"optional,in(active|inactive|suspended)"`
|
||||
CompanyID *string `query:"company_id" valid:"optional"`
|
||||
|
||||
@@ -64,7 +64,7 @@ type ResetPasswordForm struct {
|
||||
|
||||
// Admin DTOs
|
||||
type ListUsersForm struct {
|
||||
Search *string `query:"search" valid:"optional"`
|
||||
Search *string `query:"q" valid:"optional"`
|
||||
Status *string `query:"status" valid:"optional,in(active|inactive|suspended)"`
|
||||
Role *string `query:"role" valid:"optional,in(admin|manager|operator|viewer)"`
|
||||
CompanyID *string `query:"company_id" valid:"optional"`
|
||||
|
||||
Reference in New Issue
Block a user