LT-67 Fixing navigation issues and implementing server's removal
This commit is contained in:
1 parent
16a302e979
commit
1ca585bfb0
6 files changed
+37
-33
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user