From 34064e8b3605a28920a1fb819bb23d72f997c5a2 Mon Sep 17 00:00:00 2001 From: "n.nakhostin" Date: Sun, 7 Sep 2025 12:19:19 +0330 Subject: [PATCH] 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. --- internal/customer/form.go | 2 +- internal/user/form.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/customer/form.go b/internal/customer/form.go index 3a495fd..1f124b6 100644 --- a/internal/customer/form.go +++ b/internal/customer/form.go @@ -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"` diff --git a/internal/user/form.go b/internal/user/form.go index a317b57..71b4d66 100644 --- a/internal/user/form.go +++ b/internal/user/form.go @@ -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"`