File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
references/hello-world/src/trigger Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -50,21 +50,20 @@ export const waitToken = task({
50
50
expirationTime : "1h" ,
51
51
} ) ;
52
52
53
- logger . log ( "Public access token" , { publicAccessToken } ) ;
54
-
55
- if ( completeWithPublicToken ) {
56
- await auth . withAuth (
57
- {
58
- accessToken : token . publicAccessToken ,
59
- } ,
60
- async ( ) => {
61
- await wait . completeToken < Token > ( token . id , { status : "approved" } ) ;
62
- }
63
- ) ;
64
- }
65
-
66
53
if ( completeBeforeWaiting ) {
67
- await wait . completeToken < Token > ( token . id , { status : "approved" } ) ;
54
+ if ( completeWithPublicToken ) {
55
+ await auth . withAuth (
56
+ {
57
+ accessToken : token . publicAccessToken ,
58
+ } ,
59
+ async ( ) => {
60
+ await wait . completeToken < Token > ( token . id , { status : "approved" } ) ;
61
+ }
62
+ ) ;
63
+ } else {
64
+ await wait . completeToken < Token > ( token . id , { status : "approved" } ) ;
65
+ }
66
+
68
67
await wait . for ( { seconds : 5 } ) ;
69
68
} else {
70
69
await completeWaitToken . trigger ( { token : token . id , delay : completionDelay } ) ;
You can’t perform that action at this time.
0 commit comments