File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
src/services/notifications Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1- SECRET_KEY =
2- AUTH_JWT_SECRET =
1+ SECRET_KEY = CHANGE_ME
2+ AUTH_JWT_SECRET = CHANGE_ME
33ENGINE_API_KEY =
44APPLE_TEAMID =
55APPLE_APN_KEY_ID =
Original file line number Diff line number Diff line change 11import apn from 'apn' ;
2+ import _ from 'lodash' ;
23
34let apnProvider ; // eslint-disable-line
45
@@ -9,10 +10,19 @@ if (!apnProvider) {
910 keyId : process . env . APPLE_APN_KEY_ID ,
1011 teamId : process . env . APPLE_TEAMID ,
1112 } ,
12- production : false ,
13+ production : false , // TODO: handle APLPHA/BETA/PRODUCTION
1314 } ;
1415
15- apnProvider = new apn . Provider ( options ) ;
16+ if ( _ . filter ( options . token , option => ! option ) . length > 0 ) {
17+ apnProvider = new Proxy (
18+ { } ,
19+ {
20+ get : console . log ,
21+ } ,
22+ ) ;
23+ } else {
24+ apnProvider = new apn . Provider ( options ) ;
25+ }
1626}
1727
1828export default apnProvider ;
You can’t perform that action at this time.
0 commit comments