Skip to content

Commit

Permalink
Merge pull request #1155 from jacobbednarz/handle-non-module-bodies
Browse files Browse the repository at this point in the history
workers: default body to provided payload
  • Loading branch information
jacobbednarz committed Dec 23, 2022
2 parents c6b5cbf + 7e65cb2 commit 2f6c5a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/1155.txt
@@ -0,0 +1,3 @@
```release-note:bug
workers: correctly set `body` value for non-ES module uploads
```
2 changes: 1 addition & 1 deletion workers.go
Expand Up @@ -214,10 +214,10 @@ func (api *API) UploadWorker(ctx context.Context, rc *ResourceContainer, params
return WorkerScriptResponse{}, ErrMissingAccountID
}

body := []byte(params.Script)
var (
contentType = "application/javascript"
err error
body []byte
)

if params.Module || len(params.Bindings) > 0 {
Expand Down

0 comments on commit 2f6c5a5

Please sign in to comment.