File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ import {
1010 validateInput ,
1111 type ValidInput ,
1212} from '@hello.nrfcloud.com/lambda-helpers/validateInput'
13- import { Context , Email } from '@hello.nrfcloud.com/proto-map/api'
13+ import { Context , Email , type UserJWT } from '@hello.nrfcloud.com/proto-map/api'
1414import middy from '@middy/core'
15- import { Type } from '@sinclair/typebox'
15+ import { Type , type Static } from '@sinclair/typebox'
1616import type {
1717 APIGatewayProxyEventV2 ,
1818 APIGatewayProxyResultV2 ,
@@ -62,11 +62,19 @@ const h = async (
6262 } )
6363 }
6464
65+ const jwt = userJWT ( email , jwtSettings )
66+
67+ const res : Static < typeof UserJWT > = {
68+ '@context' : Context . userJWT . toString ( ) ,
69+ jwt,
70+ email,
71+ }
72+
6573 return aResponse (
6674 201 ,
6775 {
76+ ...res ,
6877 '@context' : Context . userJWT ,
69- jwt : userJWT ( email , jwtSettings ) ,
7078 } ,
7179 60 * 60 * 24 , // 24 hours
7280 )
You can’t perform that action at this time.
0 commit comments