Merge branch 'hotfix/21.56.9' into master
[gitter.git] / server / api / v1 / userapn.js
blob90bb7302fbeb688593b1c416258af0d8da5c24e3
1 'use strict';
3 var env = require('gitter-web-env');
4 var winston = env.logger;
5 var pushNotificationService = require('gitter-web-push-notifications');
7 module.exports = function(req, res, next) {
8 winston.info('APN user registration', { deviceId: req.body.deviceId, userId: req.user.id });
10 return pushNotificationService
11 .registerUser(req.body.deviceId, req.user.id)
12 .then(function() {
13 res.send({ success: true });
15 .catch(next);