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
3
3
ENGINE_API_KEY =
4
4
APPLE_TEAMID =
5
5
APPLE_APN_KEY_ID =
Original file line number Diff line number Diff line change 1
1
import apn from 'apn' ;
2
+ import _ from 'lodash' ;
2
3
3
4
let apnProvider ; // eslint-disable-line
4
5
@@ -9,10 +10,19 @@ if (!apnProvider) {
9
10
keyId : process . env . APPLE_APN_KEY_ID ,
10
11
teamId : process . env . APPLE_TEAMID ,
11
12
} ,
12
- production : false ,
13
+ production : false , // TODO: handle APLPHA/BETA/PRODUCTION
13
14
} ;
14
15
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
+ }
16
26
}
17
27
18
28
export default apnProvider ;
You can’t perform that action at this time.
0 commit comments