LT-67 Fixing navigation issues and implementing server's removal

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2016-08-04 16:49:51 +02:00
1 parent 16a302e979
commit 1ca585bfb0
6 files changed
+37 -33

No files matched your search

+11 -2
View File
@@ -12,12 +12,13 @@ Meteor.startup(function() {
});
Meteor.methods({
saveServer: function(serverSettings) {
if (!Meteor.userId()) {
throw new Meteor.Error('not-authorized');
}
var criteria = {
var query = {
_id: serverSettings._id
};
var options = {
@@ -35,6 +36,14 @@ Meteor.methods({
};
Servers.update(criteria, serverSettings, options, callback);
Servers.update(query, serverSettings, options, callback);
},
removeServer: function(serverId) {
var query = {
_id: serverId
};
Servers.remove(query, true);
}
});