|
1 | 1 | /* eslint no-underscore-dangle: ["error", { "allow": ["_id"] }] */
|
2 | 2 |
|
3 |
| -import _ from 'lodash'; |
4 |
| -import apn from 'apn'; |
5 |
| -import gcm from 'node-gcm'; |
6 |
| -import util from 'util'; |
| 3 | +// import _ from 'lodash'; |
| 4 | +// import apn from 'apn'; |
| 5 | +// import gcm from 'node-gcm'; |
| 6 | +// import util from 'util'; |
7 | 7 |
|
8 |
| -import apnProvider from './apn'; |
9 |
| -import gcmProvider from './gcm'; |
| 8 | +// import apnProvider from './apn'; |
| 9 | +// import gcmProvider from './gcm'; |
10 | 10 | import UserModel from '../../models/User';
|
11 | 11 | import ProcedureModel from '../../models/Procedure';
|
12 |
| -import CONFIG from '../../config/constants'; |
| 12 | +// import CONFIG from '../../config/constants'; |
13 | 13 |
|
14 |
| -const sendNotifications = ({ tokenObjects, message }) => { |
15 |
| - const androidNotificationTokens = []; |
| 14 | +// TODO: remove both eslint-disable-line |
| 15 | +const sendNotifications = ({ tokenObjects, message }) => { // eslint-disable-line |
| 16 | + // Disable Push Notifications |
| 17 | + return; // eslint-disable-line |
| 18 | + /* const androidNotificationTokens = []; |
16 | 19 | tokenObjects.forEach(({ token, os }) => {
|
17 | 20 | switch (os) {
|
18 | 21 | case 'ios':
|
@@ -56,7 +59,7 @@ const sendNotifications = ({ tokenObjects, message }) => {
|
56 | 59 | else console.log('gcmProvider', response);
|
57 | 60 | },
|
58 | 61 | );
|
59 |
| - } |
| 62 | + } */ |
60 | 63 | };
|
61 | 64 |
|
62 | 65 | const newVote = async ({ procedureId }) => {
|
@@ -106,8 +109,13 @@ const procedureUpdate = async ({ procedureId }) => {
|
106 | 109 |
|
107 | 110 | export { procedureUpdate, newVote, newPreperation };
|
108 | 111 |
|
109 |
| -export default async ({ message, user }) => { |
110 |
| - let userId; |
| 112 | +// TODO: remove both eslint-disable-line |
| 113 | +export default async ({ message, user }) => { // eslint-disable-line |
| 114 | + // Disable Push Notifications |
| 115 | + return; // eslint-disable-line |
| 116 | + // This function seems to be (partly) a duplicate of the sendNotifications function |
| 117 | + // refactor? |
| 118 | + /* let userId; |
111 | 119 | if (_.isObject(user)) {
|
112 | 120 | userId = user._id;
|
113 | 121 | }
|
@@ -158,5 +166,5 @@ export default async ({ message, user }) => {
|
158 | 166 | },
|
159 | 167 | );
|
160 | 168 | }
|
161 |
| - } |
| 169 | + } */ |
162 | 170 | };
|
0 commit comments