mirror of
https://gitlab.silvrtree.co.uk/martind2000/SODashServer.git
synced 2025-03-13 06:50:00 +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) {
|
||||
|
||||
var body = req.body;
|
||||
var body = req.body, registrationId;
|
||||
|
||||
logger.debug(body);
|
||||
|
||||
if (body.hasOwnProperty(id)) {
|
||||
logger.debug(body.id);
|
||||
if (body.hasOwnProperty('registrationId')) {
|
||||
registrationId = body['registrationId'];
|
||||
logger.debug(registrationId);
|
||||
|
||||
if (iosTokens.indexOf(body.id) === -1) {
|
||||
iosTokens.push(body.id);
|
||||
if (iosTokens.indexOf(registrationId) === -1) {
|
||||
iosTokens.push(registrationId);
|
||||
logger.info('IOS Device registered.');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user