Skip to content

Commit

Permalink
update path to use the public API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Aug 1, 2023
1 parent 362c1d7 commit 504d02a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func (api *API) UploadWorker(ctx context.Context, rc *ResourceContainer, params

uri := fmt.Sprintf("/accounts/%s/workers/scripts/%s", rc.Identifier, params.ScriptName)
if params.DispatchNamespaceName != nil {
uri = fmt.Sprintf("/accounts/%s/workers/dispatch/namespaces/%s/scripts/%s", rc.Identifier, *params.DispatchNamespaceName, params.ScriptName)
uri = fmt.Sprintf("/accounts/%s/workers/dispatch_namespaces/%s/scripts/%s", rc.Identifier, *params.DispatchNamespaceName, params.ScriptName)
}

headers := make(http.Header)
Expand Down
2 changes: 1 addition & 1 deletion workers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ func TestUploadWorker_ToDispatchNamespace(t *testing.T) {
fmt.Fprint(w, workersScriptResponse(t))
}
mux.HandleFunc(
fmt.Sprintf("/accounts/"+testAccountID+"/workers/dispatch/namespaces/%s/scripts/bar", namespaceName),
fmt.Sprintf("/accounts/"+testAccountID+"/workers/dispatch_namespaces/%s/scripts/bar", namespaceName),
handler,
)

Expand Down

0 comments on commit 504d02a

Please sign in to comment.