Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mytc/859aea8266dd948e91189198a19af964 to your computer and use it in GitHub Desktop.
Save mytc/859aea8266dd948e91189198a19af964 to your computer and use it in GitHub Desktop.
The method cannot be saved using jagi astronomy
EditSpace(data){
if(Roles.userIsInRole(this.userId, ['admin'])){
let input = {
title : data['title'].trim(),
content : data['content'],
location : data['location'],
tag : data['tag'],
col : Number(data['col']),
row : Number(data['row']),
}
let id = data['id'];
let space = Spaces.findOne(id);
space.set(input);
space.save(function(err,id){
if(err){
console.log(err);
throw new Meteor.Error('erro-obj', err);
}else{
return id;
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment