Skip to content
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

Settings in stream #109

Merged
merged 4 commits into from
Nov 28, 2016
Merged

Settings in stream #109

merged 4 commits into from
Nov 28, 2016

Conversation

davidgljay
Copy link

What does this PR do?

Moves settings to the stream call

How do I test this PR?

  1. Load the comment stream
  2. Check the network tab, there should not be a call to api/v1/settings
  3. Check the redux store, the settings should be visible in the config section of the store
  4. All tests should pass

case 'post':
return Promise.all([Comment.findAcceptedAndNewByAssetId(asset.id), asset, settings]);
default:
return Promise.reject(new Error('Moderation setting not found.'));
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The switch was replaced because the default described in the database is "pre". Because there can be only two states it made sense to not complain in the event of a missing setting. I'd prefer to retain this as the single if check as before and simply add the settings object to the returned Promise.all below.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wyattjoh, this change has been implemented.

@riley riley merged commit ce9d1e6 into master Nov 28, 2016
@riley riley deleted the settings-in-stream branch November 28, 2016 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants