From ed86025b5fa876d0672cf08aa320d951142628bf Mon Sep 17 00:00:00 2001 From: david Date: Mon, 11 Nov 2019 18:20:59 +0100 Subject: [PATCH] . --- helpers/messages.json | 2 +- helpers/notification.helpers.js | 2 +- helpers/push.helper.js | 3 --- modules/events/event.controller.js | 8 +++++--- modules/notification/notification.controller.js | 8 +++----- modules/notification/notification.service.js | 8 +------- modules/notification/notification.validations.js | 2 +- modules/notification/notification_detail.service.js | 1 - 8 files changed, 12 insertions(+), 22 deletions(-) diff --git a/helpers/messages.json b/helpers/messages.json index a95822e..e7482c1 100644 --- a/helpers/messages.json +++ b/helpers/messages.json @@ -25,7 +25,7 @@ "push": { "confirmInvitation": { "title": "{{ congress }}", - "message": "Tu inscripción al congreso de {{ congress }} está confirmada.", + "body": "Tu inscripción al congreso de {{ congress }} está confirmada.", "data": { "type": "message", "title": "{{ congress }}", diff --git a/helpers/notification.helpers.js b/helpers/notification.helpers.js index 663c763..d62d646 100644 --- a/helpers/notification.helpers.js +++ b/helpers/notification.helpers.js @@ -7,7 +7,7 @@ const createNotification = (data) => { return { date: data.date, title: data.title, - body: data.message, + body: data.body, ttl: data.ttl, priority: data.priority ? data.priority : 'high', recipients: data.recipients, diff --git a/helpers/push.helper.js b/helpers/push.helper.js index 6a4fb8b..0d4e71d 100644 --- a/helpers/push.helper.js +++ b/helpers/push.helper.js @@ -4,9 +4,6 @@ const { Expo } = require('expo-server-sdk'); const expo = new Expo(); const createPushMessage = (data) => { - console.log('---------------------------------'); - console.log(data); - console.log('---------------------------------'); return { title: data.title, body: data.body, diff --git a/modules/events/event.controller.js b/modules/events/event.controller.js index fc6a6f2..ebf5cf1 100644 --- a/modules/events/event.controller.js +++ b/modules/events/event.controller.js @@ -10,7 +10,7 @@ const messages = require('../../helpers/messages.json'); const eventService = require('./event.service'); const eventReservationService = require('./events_reservations.service'); const eventInscriptionService = require('./events_inscriptions.service'); -const notificationController = require('../notification/notification.controller'); +const notificationService = require('../notification/notification.service'); const { extractParamsFromRequest, handleErrorResponse, handleResultResponse } = require('../../helpers/controller.helper'); @@ -286,11 +286,12 @@ console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>> { if (userIds) { diff --git a/modules/notification/notification.service.js b/modules/notification/notification.service.js index 872f25c..bdd6106 100644 --- a/modules/notification/notification.service.js +++ b/modules/notification/notification.service.js @@ -12,7 +12,7 @@ const extraMethods = { return { date: data.date, title: data.title, - body: data.message, + body: data.body, ttl: data.ttl, priority: data.priority, recipients: data.recipients, @@ -22,9 +22,6 @@ const extraMethods = { }, saveNotification: ({ date, title, body, ttl, priority, recipients, data, userId }) => { - console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><