Skip to content

Commit

Permalink
Fix deployment endpoint for wrangler pages publish (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
GregBrimble authored May 6, 2022
1 parent 9903526 commit 94d3d6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-lies-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: Hit correct endpoint for 'wrangler pages publish'
2 changes: 1 addition & 1 deletion packages/wrangler/src/__tests__/pages.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ describe("pages", () => {
);

setMockResponse(
"/accounts/:accountId/pages/projects/foo/deployment",
"/accounts/:accountId/pages/projects/foo/deployments",
async ([_url, accountId], init) => {
expect(accountId).toEqual("some-account-id");
expect(init.method).toEqual("POST");
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/src/pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ const createDeployment: CommandModule<
}

const deploymentResponse = await fetchResult<Deployment>(
`/accounts/${accountId}/pages/projects/${projectName}/deployment`,
`/accounts/${accountId}/pages/projects/${projectName}/deployments`,
{
method: "POST",
body: formData,
Expand Down

0 comments on commit 94d3d6d

Please sign in to comment.