Skip to content
Snippets Groups Projects
Commit 028ba718 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Remove some logs

parent 44da1175
No related branches found
No related tags found
No related merge requests found
...@@ -9,19 +9,20 @@ RocketChat.settings.add = (_id, value, options = {}) -> ...@@ -9,19 +9,20 @@ RocketChat.settings.add = (_id, value, options = {}) ->
if not _id or not value? if not _id or not value?
return false return false
console.log '[functions] RocketChat.settings.add -> '.green, 'arguments:', arguments # console.log '[functions] RocketChat.settings.add -> '.green, 'arguments:', arguments
if Meteor.settings?[_id]? if Meteor.settings?[_id]?
value = Meteor.settings[_id] value = Meteor.settings[_id]
updateSettings = updateSettings =
i18nLabel: options.i18nLabel or _id i18nLabel: options.i18nLabel or _id
i18nDescription: options.i18nDescription if options.i18nDescription? i18nDescription: options.i18nDescription if options.i18nDescription?
updateSettings.type = options.type if options.type updateSettings.type = options.type if options.type
updateSettings.multiline = options.multiline if options.multiline
updateSettings.group = options.group if options.group updateSettings.group = options.group if options.group
updateSettings.public = options.public if options.public updateSettings.public = options.public if options.public
return Settings.upsert { _id: _id }, { $setOnInsert: { value: value }, $set: updateSettings } return Settings.upsert { _id: _id }, { $setOnInsert: { value: value }, $set: updateSettings }
### ###
...@@ -33,7 +34,7 @@ RocketChat.settings.addGroup = (_id, options = {}) -> ...@@ -33,7 +34,7 @@ RocketChat.settings.addGroup = (_id, options = {}) ->
if not _id if not _id
return false return false
console.log '[functions] RocketChat.settings.addGroup -> '.green, 'arguments:', arguments # console.log '[functions] RocketChat.settings.addGroup -> '.green, 'arguments:', arguments
updateSettings = updateSettings =
i18nLabel: options.i18nLabel or _id i18nLabel: options.i18nLabel or _id
...@@ -50,6 +51,6 @@ Meteor.methods ...@@ -50,6 +51,6 @@ Meteor.methods
unless user?.admin is true unless user?.admin is true
throw new Meteor.Error 503, 'Not authorized' throw new Meteor.Error 503, 'Not authorized'
console.log "saveSetting -> ".green, _id, value # console.log "saveSetting -> ".green, _id, value
Settings.update { _id: _id }, { $set: { value: value } } Settings.update { _id: _id }, { $set: { value: value } }
return true return true
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment