fix tabbing
This commit is contained in:
parent
e51d35eba9
commit
cf7a586cf2
@ -6,12 +6,14 @@ _uuid4 = function(cc) {
|
||||
return (cc === 'x' ? rr : (rr & 0x3 | 0x8)).toString(16);
|
||||
}
|
||||
|
||||
Meteor.methods({
|
||||
Meteor.methods({
|
||||
'genCode': function() {
|
||||
return 'xxxxxx'.replace(/[x]/g, _uuid4);
|
||||
},
|
||||
//NOT COMPLETE V
|
||||
'createClass': function(input) {
|
||||
if(Meteor.user() != null && Meteor.classes.find({status:true, admin:Meteor.userId()}).length < 5){
|
||||
if(Meteor.user() != null && Meteor.classes.find({status:true, admin:Meteor.userId()}).length < 5 &&
|
||||
schools.find({name:input.school}).fetch().length > 0){
|
||||
classes.schema.validate(input);
|
||||
classes.insert(input);
|
||||
}
|
||||
@ -39,4 +41,4 @@ _uuid4 = function(cc) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user