-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to persist cart update #146
Comments
@kushalmahajan Can you push your code to github so I can take a look? |
I checked terminal and there on refreshing the page there is this error -
|
Nothing seems to work fine after this error. There is a failed fetch request for
And my service worker will not install after this :( |
I'll have to take a look later. Make sure your PUT payload matches what you find I the API markdown file In the root of the project. The .map issue sounds like an array was expected and might be missing from your payload
For world-class web developer training: https://mike.works
…________________________________
From: Kushal V. Mahajan <notifications@github.com>
Sent: Monday, August 13, 2018 12:18:53 PM
To: mike-works/pwa-fundamentals
Cc: Mike North; Comment
Subject: Re: [mike-works/pwa-fundamentals] Not able to persist cart update (#146)
Nothing seems to work fine after this error. There is a failed fetch request for
GET https://localhost:3000/order/web-app-manifest.json 404 (Not Found)
Manifest: Line: 1, column: 1, Unexpected token.
And my service worker will not install after this :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#146 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAiDtXJty0XHoo-u_fwFj_D2fC8c-F2Pks5uQdEdgaJpZM4V62nx>.
|
I know but I am doing that in modified functions.
It sure came up in the video too but not sure where's it coming from now.
Warm Regards,
Kushal V. Mahajan
…On Tue 14 Aug, 2018, 02:12 Mike North, ***@***.***> wrote:
I'll have to take a look later. Make sure your PUT payload matches what
you find I the API markdown file In the root of the project. The .map issue
sounds like an array was expected and might be missing from your payload
For world-class web developer training: https://mike.works
________________________________
From: Kushal V. Mahajan ***@***.***>
Sent: Monday, August 13, 2018 12:18:53 PM
To: mike-works/pwa-fundamentals
Cc: Mike North; Comment
Subject: Re: [mike-works/pwa-fundamentals] Not able to persist cart update
(#146)
Nothing seems to work fine after this error. There is a failed fetch
request for
GET https://localhost:3000/order/web-app-manifest.json 404 (Not Found)
Manifest: Line: 1, column: 1, Unexpected token.
And my service worker will not install after this :(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<
#146 (comment)>,
or mute the thread<
https://github.com/notifications/unsubscribe-auth/AAiDtXJty0XHoo-u_fwFj_D2fC8c-F2Pks5uQdEdgaJpZM4V62nx
>.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#146 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALQk8BqrqyDKd3gAPUexkbeJ1I_mmpp9ks5uQeSlgaJpZM4V62nx>
.
|
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?
The text was updated successfully, but these errors were encountered: