mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 13:46:51 +08:00
Merge branch 'master' into feature/client-auth
This commit is contained in:
@@ -171,10 +171,6 @@ func (s *WorkflowServer) ListWorkflows(ctx context.Context, req *api.ListWorkflo
|
||||
req.PageSize = 15
|
||||
}
|
||||
|
||||
if req.Page <= 0 {
|
||||
req.Page = 1
|
||||
}
|
||||
|
||||
workflows, err := client.ListWorkflows(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion)
|
||||
if errors.As(err, &userError) {
|
||||
return nil, userError.GRPCError()
|
||||
@@ -190,6 +186,10 @@ func (s *WorkflowServer) ListWorkflows(ctx context.Context, req *api.ListWorkflo
|
||||
req.Page = pages
|
||||
}
|
||||
|
||||
if req.Page <= 0 {
|
||||
req.Page = 1
|
||||
}
|
||||
|
||||
start := (req.Page - 1) * req.PageSize
|
||||
end := start + req.PageSize
|
||||
if end >= int32(len(apiWorkflows)) {
|
||||
|
Reference in New Issue
Block a user