Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
onesignal-node
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Schedules
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Cedar Studios
onesignal-node
Commits
07bb95ef
Commit
07bb95ef
authored
May 21, 2018
by
zeynel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant check for parameters.
parent
c64d71e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
notification.js
lib/notification.js
+2
-3
No files found.
lib/notification.js
View file @
07bb95ef
'use strict'
;
'use strict'
;
// TODO Deprecate
var
ALLOWED_FIELDS
=
[
'contents'
,
'included_segments'
,
'excluded_segments'
,
'filters'
,
'include_player_ids'
,
var
ALLOWED_FIELDS
=
[
'contents'
,
'included_segments'
,
'excluded_segments'
,
'filters'
,
'include_player_ids'
,
'app_id'
,
'app_ids'
,
'headings'
,
'subtitle'
,
'template_id'
,
'content_available'
,
'mutable_content'
,
'app_id'
,
'app_ids'
,
'headings'
,
'subtitle'
,
'template_id'
,
'content_available'
,
'mutable_content'
,
'data'
,
'url'
,
'ios_attachments'
,
'big_picture'
,
'adm_big_picture'
,
'chrome_big_picture'
,
'buttons'
,
'data'
,
'url'
,
'ios_attachments'
,
'big_picture'
,
'adm_big_picture'
,
'chrome_big_picture'
,
'buttons'
,
...
@@ -46,11 +47,9 @@ var Notification = function (initialBody) {
...
@@ -46,11 +47,9 @@ var Notification = function (initialBody) {
* @param value
* @param value
*/
*/
Notification
.
prototype
.
setParameter
=
function
(
name
,
value
)
{
Notification
.
prototype
.
setParameter
=
function
(
name
,
value
)
{
// TODO Deprecate
if
(
name
&&
name
[
0
]
===
'!'
)
{
if
(
name
&&
name
[
0
]
===
'!'
)
{
name
=
name
.
substring
(
1
);
name
=
name
.
substring
(
1
);
}
else
if
(
ALLOWED_FIELDS
.
indexOf
(
name
)
===
-
1
)
{
throw
'"'
+
name
+
'" is not present in documentation. You should add a '
+
'exclamation mark to the begging of the name, if you want to set it : !'
+
name
;
}
}
this
.
postBody
[
name
]
=
value
;
this
.
postBody
[
name
]
=
value
;
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment