createClass optimization
This commit is contained in:
parent
2fffc374b6
commit
efe80f8b45
@ -26,8 +26,8 @@ Meteor.methods({
|
|||||||
// if superadmin, no need for approval
|
// if superadmin, no need for approval
|
||||||
classes.schema.validate(input);
|
classes.schema.validate(input);
|
||||||
if(Meteor.user() != null && classes.find({status:false, admin:Meteor.userId()}).fetch().length < 5 &&
|
if(Meteor.user() != null && classes.find({status:false, admin:Meteor.userId()}).fetch().length < 5 &&
|
||||||
schools.findOne({name:input.school}) != null && input.status === false) {
|
schools.findOne({name:input.school}) != null) {
|
||||||
|
input.status = false;
|
||||||
input.subscribers = 0;
|
input.subscribers = 0;
|
||||||
input.admin = Meteor.userId()
|
input.admin = Meteor.userId()
|
||||||
if (input.privacy) {
|
if (input.privacy) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user