File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ const sdkId = "06f10391-1f16-4e1c-af6c-d6cd6a8714af";
6
6
const yotiPem = Fs . readFileSync ( Path . join ( __dirname , '../keys/yoti.pem' ) ) ;
7
7
const yotiClient = new Yoti ( sdkId , yotiPem ) ;
8
8
9
+ const users = {
10
+ 'fAUhmIxQAMxKd7pQ0mACongkiz3OpS1oqLfHpamEN7QT0CCuBy4DCsgzpUn9g87G' : {
11
+ name : 'John Whiles' ,
12
+ status : true
13
+ }
14
+ }
15
+
9
16
const confirmationHandler = ( request , reply ) => {
10
17
const token = request . query . token ;
11
18
if ( ! token ) {
@@ -15,8 +22,11 @@ const confirmationHandler = (request, reply) => {
15
22
const promise = yotiClient . getActivityDetails ( token ) ;
16
23
promise . then ( ( activityDetails ) => {
17
24
const userId = activityDetails . getUserId ( ) ;
18
- const profile = activityDetails . getUserProfile ( ) ;
19
- reply ( profile ) ;
25
+ if ( users [ userId ] . status === true ) {
26
+ reply ( 'they are a good scout' ) ;
27
+ } else {
28
+ reply ( 'not a good scout' ) ;
29
+ }
20
30
} )
21
31
} ;
22
32
You can’t perform that action at this time.
0 commit comments