Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Delete entire stats object when saving. #1287

Merged
merged 1 commit into from
Mar 23, 2018
Merged

Delete entire stats object when saving. #1287

merged 1 commit into from
Mar 23, 2018

Conversation

jjeffryes
Copy link
Contributor

When the profile was edited, it was sending

stats: {
  postCount: 0,
}

which caused the server to return values of 0 for all the stats child objects.

Since we shouldn't be overwriting the stats object at all, this PR removes it on non-read syncs instead of removing specific children.

@rmisio do you know of a reason we wouldn't want to just remove the stats object? My assumption is the postCount attribute was added to the server and we didn't catch it, which created this bug. That attribute isn't used for anything in the client as far as I can tell.

Closes #656

This may close this server bug OpenBazaar/openbazaar-go#696

@jjeffryes jjeffryes requested a review from rmisio March 23, 2018 15:23
@rmisio
Copy link
Contributor

rmisio commented Mar 23, 2018

do you know of a reason we wouldn't want to just remove the stats object?

If you mean remove it from what we're sending back to the server, then no.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Page stats goes to zero after updating page settings
2 participants