Skip to content

Not able to persist cart update #146

@kvedantmahajan

Description

@kvedantmahajan

Here's my code for _saveCart

_saveCart() { this._onItemsUpdated(); return fetch(${API_ENDPOINT}api/cart/items, { method: 'PUT', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ data: this.items }) }).then(res => res.json()) .then(res => res.data) .catch(error => console.error(error)); }

PUT request is successful. However, as I refresh the page, data is gone.

Where should I look for to add missing pieces to work it around?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions