mirror of
https://gitlab.silvrtree.co.uk/martind2000/SODashServer.git
synced 2025-03-13 10:00:02 +00:00
Push notifications used wrong id.
This commit is contained in:
parent
306781c03d
commit
ec6cecd270
11
app.js
11
app.js
@ -216,15 +216,16 @@ app.post('/api/v1/projector/on', projector_v1.turnon);
|
|||||||
|
|
||||||
app.post('/api/v1/register/ios', function(req, res) {
|
app.post('/api/v1/register/ios', function(req, res) {
|
||||||
|
|
||||||
var body = req.body;
|
var body = req.body, registrationId;
|
||||||
|
|
||||||
logger.debug(body);
|
logger.debug(body);
|
||||||
|
|
||||||
if (body.hasOwnProperty(id)) {
|
if (body.hasOwnProperty('registrationId')) {
|
||||||
logger.debug(body.id);
|
registrationId = body['registrationId'];
|
||||||
|
logger.debug(registrationId);
|
||||||
|
|
||||||
if (iosTokens.indexOf(body.id) === -1) {
|
if (iosTokens.indexOf(registrationId) === -1) {
|
||||||
iosTokens.push(body.id);
|
iosTokens.push(registrationId);
|
||||||
logger.info('IOS Device registered.');
|
logger.info('IOS Device registered.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user