- add: createPushSubscription :

'Subscribed to FreePlanet.app!',
  'You can now receive Notification and Messages.'
This commit is contained in:
Paolo Arena
2019-02-05 18:17:44 +01:00
parent 8e5e7addb7
commit db2a460594
11 changed files with 38 additions and 42 deletions

View File

@@ -0,0 +1,17 @@
const express = require('express');
const router = express.Router();
router.get('/:email', (req, res) => {
var email = req.params.email;
User.findByEmail(email).then((user) => {
if (!user) {
return res.status(404).send();
}
res.status(200).send();
}).catch((e) => {
res.status(400).send();
});
});
module.exports = router;