@@ -18,7 +18,7 @@ const invalidLink = () => oopsPage(
1818 < a href =/me > homepage</ a > .`
1919) ;
2020
21- export const verificationSuccessful = pipe (
21+ const verificationSuccessful = pipe (
2222 html `
2323 < div class ="container ">
2424 < div class ="max-w-md mx-auto ">
@@ -48,14 +48,15 @@ export const verificationSuccessful = pipe(
4848
4949export const landing =
5050 ( deps : Dependencies , conf : Config ) =>
51- async ( req : Request , res : Response < CompleteHtmlDocument > ) => {
51+ async ( req : Request , res : Response < CompleteHtmlDocument > ) : Promise < void > => {
5252 const decoded = decodeEmailVerificationLink ( deps . logger , conf ) ( req ) ;
5353 if ( E . isLeft ( decoded ) ) {
5454 deps . logger . error (
5555 decoded . left ,
5656 'Failed to decode verification link'
5757 ) ;
58- return res . send ( invalidLink ( ) ) ;
58+ res . send ( invalidLink ( ) ) ;
59+ return ;
5960 }
6061 const resource = verifyEmail . resource ( decoded . right ) ;
6162 const resourceEvents = await deps . getResourceEvents ( resource ) ( ) ;
@@ -64,7 +65,8 @@ export const landing =
6465 resourceEvents . left ,
6566 'Failed to get resource events for email verification link'
6667 ) ;
67- return res . send ( invalidLink ( ) ) ;
68+ res . send ( invalidLink ( ) ) ;
69+ return ;
6870 }
6971
7072 // Note that we don't need to check isAuthorized here because we are authorised
@@ -85,9 +87,11 @@ export const landing =
8587 commitEvent . left ,
8688 'Failed to commit verification link event'
8789 ) ;
88- return res . send ( invalidLink ( ) ) ;
90+ res . send ( invalidLink ( ) ) ;
91+ return ;
8992 }
9093 }
9194 deps . logger . info ( `Successfully verified email %o` , decoded . right ) ;
92- return res . send ( verificationSuccessful ) ;
95+ res . send ( verificationSuccessful ) ;
96+ return ;
9397 } ;
0 commit comments