mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-30 18:00:56 +01:00
refactor: enhance parameter handling and improve code clarity
- Updated GetListParams to set a default sort option for better query handling. - Enhanced PostSpiderRunParams to include a default mode and improved error handling for missing spider. - Added parameters field to ChatMessageContent for more flexible message content management. - Refactored getNodeIds method to simplify mode handling and removed unnecessary error checks. - Improved ChatMessageAction component to display parameters and response sections more effectively, enhancing user experience.
This commit is contained in:
@@ -63,7 +63,7 @@ type BaseController[T any] struct {
|
||||
|
||||
type GetListParams struct {
|
||||
Filter string `query:"filter" description:"Filter query"`
|
||||
Sort string `query:"sort" description:"Sort options"`
|
||||
Sort string `query:"sort" default:"-_id" description:"Sort options"`
|
||||
Page int `query:"page" default:"1" description:"Page number" minimum:"1"`
|
||||
Size int `query:"size" default:"10" description:"Page size" minimum:"1"`
|
||||
All bool `query:"all" default:"false" description:"Whether to get all items"`
|
||||
|
||||
Reference in New Issue
Block a user