Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
028ba718
Commit
028ba718
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Remove some logs
parent
44da1175
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/rocketchat-lib/settings/server/methods.coffee
+7
-6
7 additions, 6 deletions
packages/rocketchat-lib/settings/server/methods.coffee
with
7 additions
and
6 deletions
packages/rocketchat-lib/settings/server/methods.coffee
+
7
−
6
View file @
028ba718
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment