Skip to content

Commit

Permalink
Change Basket Modify Request Method to POST
Browse files Browse the repository at this point in the history
Users should be able to update the contents of the basket entirely via
the dashboard. Currently, the dashboard uses a put to add/edit the
contents of the basket. However, users would probably like to have full
control and overwrite the entirety of a basket's content if they wish.

This change addresses the need by:
* Updating the request method from PUT to POST

Resolves #150
  • Loading branch information
imRohan committed Mar 27, 2022
1 parent 18407ef commit bff540c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/src/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/src/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/app/components/basket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const basket = {
},
async save(): Promise<void> {
await axios({
method: 'PUT',
method: 'POST',
data: this.data,
url: this.basketPath(),
})
Expand Down

0 comments on commit bff540c

Please sign in to comment.