I am using the aws-nodejs-typescript template
I want to do something like this
functions:
verify-token:
handler: auth/VerifyToken.auth
profile:
handler: auth/AuthHandler.profile
events:
- http:
path: me
method: get
cors: true
authorizer: verify-token
So i write following -
functions: {
verify_token: {
handler: 'auth/VerifyToken.auth'
},
profile: {
handler: 'auth/AuthHandler.profile',
events: [
{
http: {
method: 'get',
path: 'persons/profile',
cors: true,
authorizer: 'verify_token'
}
}
]
}
But this gives me TS error as Type 'string' has no properties in common with type 'HttpAuthorizer'.
Can you please help?