Update SearchForm in Feedback Module to Use Query Parameters
- Modified the SearchForm struct to utilize query parameters for feedback search criteria, enhancing API consistency and usability. - Updated validation tags accordingly to reflect the new query parameter structure, ensuring proper validation during request handling.
This commit is contained in:
@@ -10,12 +10,12 @@ type ToggleFeedbackForm struct {
|
||||
|
||||
// SearchForm represents search criteria for feedback
|
||||
type SearchForm struct {
|
||||
Tender *string `json:"tender_id,omitempty" valid:"optional"`
|
||||
Customer *string `json:"customer_id,omitempty" valid:"optional"`
|
||||
Company *string `json:"company_id,omitempty" valid:"optional"`
|
||||
Type *FeedbackType `json:"feedback_type,omitempty" valid:"optional,in(like|dislike)"`
|
||||
DateFrom *int64 `json:"date_from,omitempty" valid:"optional"`
|
||||
DateTo *int64 `json:"date_to,omitempty" valid:"optional"`
|
||||
Tender *string `query:"tender_id" valid:"optional"`
|
||||
Customer *string `query:"customer_id" valid:"optional"`
|
||||
Company *string `query:"company_id" valid:"optional"`
|
||||
Type *string `query:"feedback_type" valid:"optional,in(like|dislike)"`
|
||||
DateFrom *int64 `query:"date_from" valid:"optional"`
|
||||
DateTo *int64 `query:"date_to" valid:"optional"`
|
||||
}
|
||||
|
||||
type (
|
||||
|
||||
Reference in New Issue
Block a user