mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-28 17:50:56 +01:00
refactor: standardize filter handling across controllers
- Replaced "conditions" parameter with "filter" in various controller methods to unify the filtering approach. - Updated related functions to utilize the new filter parameter, enhancing consistency in query handling. - Improved overall code readability and maintainability by aligning naming conventions and refactoring filter-related logic.
This commit is contained in:
@@ -79,10 +79,7 @@ func GetTaskList(c *gin.Context, params *GetTaskListParams) (response *ListRespo
|
||||
}
|
||||
|
||||
// get query
|
||||
query, err := GetFilterQueryFromListParams(params.GetListParams)
|
||||
if err != nil {
|
||||
return GetErrorListResponse[models.Task](err)
|
||||
}
|
||||
query := ConvertToBsonMFromListParams(params.GetListParams)
|
||||
|
||||
sort, err := GetSortOptionFromString(params.GetListParams.Sort)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user