I'm able to sign in successfully, in my sign-in "then" function I successfully console.log(store)
and these are the results I get in the console:
then when I select 'log-out' I know the ajax function is being invoked because I can log a message inside it, I can also log the data in 'store' which does have an id, but I can't get the id itself. If I replace "store.user.id" with the actual ID it works fine. I even tried throwing in an extra 'user' in the middle (store.user.user.id) but it still didn't work.
here's the function I'm using to make the ajax call
I'm able to sign in successfully, in my sign-in "then" function I successfully console.log(store) and these are the results I get in the console:
then when I select 'log-out' I know the ajax function is being invoked because I can log a message inside it, I can also log the data in 'store' which does have an id, but I can't get the id itself. If I replace "store.user.id" with the actual ID it works fine. I even tried throwing in an extra 'user' in the middle (store.user.user.id) but it still didn't work.
here's the function I'm using to make the ajax call
and here's what "store" looks like in the console (it looks wonky because it what copied from chrome... sorry):
{user: {…}} user : {id: 874, email: "dianana", token: "BAhJIiVlNDQ5ODg3OTk4OTVjNTBmMTdiYmFiMmQwMzVmNzI1ZQY6BkVG--cd6076ef3667e8d05cc0dff3d8f829d55fbd872e"} proto : Object
-- and here's the function that actually writes to the store upon successful login:
Any ideas on what I might be doing wrong? Thanks!