Skip to content

Commit

Permalink
Update workflow-version endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdiaa committed Dec 20, 2023
1 parent 8e90ba3 commit a5317e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/execute/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func createNewVersion(version *types.WorkflowVersionDetailed) *types.WorkflowVer
os.Exit(0)
}

resp := request.Trickest.Post().Body(data).DoF("library/workflow-version/")
resp := request.Trickest.Post().Body(data).DoF("workflow-version/")
if resp == nil {
fmt.Println("Error: Couldn't create version!")
os.Exit(0)
Expand Down Expand Up @@ -247,7 +247,7 @@ func uploadFile(filePath string) string {
}

func GetLatestWorkflowVersion(workflowID uuid.UUID) *types.WorkflowVersionDetailed {
resp := request.Trickest.Get().DoF("library/workflow-version/latest/?workflow=%s", workflowID)
resp := request.Trickest.Get().DoF("workflow-version/latest/?workflow=%s", workflowID)
if resp == nil {
fmt.Println("Error: Couldn't get latest workflow version!")
os.Exit(0)
Expand Down
4 changes: 2 additions & 2 deletions cmd/output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func GetRuns(workflowID uuid.UUID, pageSize int) []types.Run {
}

func GetWorkflowVersionByID(versionID, fleetID uuid.UUID) *types.WorkflowVersionDetailed {
resp := request.Trickest.Get().DoF("library/workflow-version/%s/", versionID)
resp := request.Trickest.Get().DoF("workflow-version/%s/", versionID)
if resp == nil {
fmt.Println("Error: Couldn't get workflow version!")
return nil
Expand Down Expand Up @@ -568,7 +568,7 @@ func GetWorkflowVersionByID(versionID, fleetID uuid.UUID) *types.WorkflowVersion
}

func GetWorkflowVersionMaxMachines(version, fleet uuid.UUID) (types.Machines, error) {
resp := request.Trickest.Get().DoF("library/workflow-version/%s/max-machines/?fleet=%s", version, fleet)
resp := request.Trickest.Get().DoF("workflow-version/%s/max-machines/?fleet=%s", version, fleet)
if resp == nil {
return types.Machines{}, fmt.Errorf("couldn't get workflow version's maximum machines")
}
Expand Down

0 comments on commit a5317e4

Please sign in to comment.