Skip to content
This repository has been archived by the owner on Oct 5, 2020. It is now read-only.

Account Edits Not Properly Saved #229

Closed
hunterwilliams opened this issue Sep 24, 2015 · 6 comments
Closed

Account Edits Not Properly Saved #229

hunterwilliams opened this issue Sep 24, 2015 · 6 comments
Labels
Milestone

Comments

@hunterwilliams
Copy link
Contributor

Affects Master

Not a very big deal as it doesn't affect functionality negatively. Have to get in weird use case

Recreation

  1. Login
  2. Edit Account details and submit
  3. Verify new details on page
  4. Refresh the page & now changes appear to be missing
  5. Logout & log back in
  6. Changes are now present

Behind the scenes

  • Edits are saved locally and then sent to the server
  • Since edits are local they are dropped on refresh but live in the database
  • /api/user/status serves the user from session variable and is only updated upon login

Potential issue if user edits account refreshes -> then will not see edits or will override existing edits if they hit submit again.

@grtjn
Copy link
Contributor

grtjn commented Sep 24, 2015

Ah yes, I did see that one. There is actually a TODO for that in proxy.js, to capture user profile update in the session object as well.. :)

@hunterwilliams
Copy link
Contributor Author

I'll see if I can just tack in onto to my passport modifications as that already touched this area a bunch

@grtjn
Copy link
Contributor

grtjn commented Sep 24, 2015

Might be nice to have that in 0.2.0. I tagged the passport stuff for 0.2.1..

@hunterwilliams
Copy link
Contributor Author

Alright. My thought is to make /api/user/status do a fresh pull from MarkLogic each time. It's an extra call, but the app shouldn't be asking for status often.

@grtjn
Copy link
Contributor

grtjn commented Sep 24, 2015

Works too. If you reached nodejs, going to ML is not that much further..

@grtjn
Copy link
Contributor

grtjn commented Sep 24, 2015

But that means we could drop profile from session, right? Cleaner perhaps..

@grtjn grtjn modified the milestone: 0.2.0 Sep 24, 2015
@grtjn grtjn added the bug label Sep 24, 2015
grtjn added a commit that referenced this issue Sep 25, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants