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

Check study group name is unique before new study group can create #639

Merged
merged 2 commits into from Oct 6, 2017

Conversation

Projects
None yet
3 participants
@railsstudent
Collaborator

railsstudent commented Oct 4, 2017

Fixes #585 .

I query study_groups collection in MongoDB to perform exact match on title and visibility equals true and return record count. If count is greater than 0, then Meteor throws error. Otherwise, the function follows the same logic to create new study group.

New study group is allowed to create if the name is used for the first time or all study groups with the same name are archived.

@railsstudent

This comment has been minimized.

Show comment
Hide comment
@railsstudent

railsstudent Oct 4, 2017

Collaborator

selection_008

Collaborator

railsstudent commented Oct 4, 2017

selection_008

Show outdated Hide outdated server/study_groups/methods.js Outdated
@distalx

This comment has been minimized.

Show comment
Hide comment
@distalx

distalx Oct 5, 2017

Collaborator

@railsstudent, Thanks for the PR! Here are some suggestions I hope you'll find helpful.

Collaborator

distalx commented Oct 5, 2017

@railsstudent, Thanks for the PR! Here are some suggestions I hope you'll find helpful.

Incorporate feed
Check case sensitive
Use findOne instead of find
@railsstudent

This comment has been minimized.

Show comment
Hide comment
@railsstudent

railsstudent Oct 5, 2017

Collaborator

@distalx Fixed. Please kindly review

Collaborator

railsstudent commented Oct 5, 2017

@distalx Fixed. Please kindly review

@distalx

distalx approved these changes Oct 6, 2017

LGTM!

@lpatmo

This comment has been minimized.

Show comment
Hide comment
@lpatmo

lpatmo Oct 6, 2017

Member

LGTM too!

Member

lpatmo commented Oct 6, 2017

LGTM too!

@lpatmo lpatmo merged commit 59fc593 into codebuddies:staging Oct 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment