File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1
1
import type { APIGatewayProxyResultV2 } from 'aws-lambda'
2
- import { type Static } from '@sinclair/typebox'
2
+ import type { Static } from '@sinclair/typebox'
3
3
import { Context , ProblemDetail } from '@hello.nrfcloud.com/proto/hello'
4
4
5
5
export const aProblem = (
Original file line number Diff line number Diff line change 1
- import lambda from 'aws-lambda'
2
- import { type MiddlewareObj } from '@middy/core'
1
+ import type {
2
+ APIGatewayProxyEventV2 ,
3
+ APIGatewayProxyStructuredResultV2 ,
4
+ } from 'aws-lambda'
5
+ import type { MiddlewareObj } from '@middy/core'
3
6
4
7
export const addVersionHeader = (
5
8
version : string ,
6
9
) : MiddlewareObj <
7
- lambda . APIGatewayProxyEventV2 ,
8
- lambda . APIGatewayProxyStructuredResultV2
10
+ APIGatewayProxyEventV2 ,
11
+ APIGatewayProxyStructuredResultV2
9
12
> => ( {
10
13
after : async ( req ) => {
11
14
if ( req . response === null ) return
Original file line number Diff line number Diff line change 1
- import lambda from 'aws-lambda'
2
- import { type MiddlewareObj } from '@middy/core'
1
+ import type {
2
+ APIGatewayProxyEventV2 ,
3
+ APIGatewayProxyStructuredResultV2 ,
4
+ } from 'aws-lambda'
5
+ import type { MiddlewareObj } from '@middy/core'
3
6
import { corsHeaders } from './corsHeaders.js'
4
7
5
8
export const corsOPTIONS = (
6
9
...allowedMethods : string [ ]
7
10
) : MiddlewareObj <
8
- lambda . APIGatewayProxyEventV2 ,
9
- lambda . APIGatewayProxyStructuredResultV2
11
+ APIGatewayProxyEventV2 ,
12
+ APIGatewayProxyStructuredResultV2
10
13
> => ( {
11
14
before : async ( req ) => {
12
15
if ( req . event . requestContext . http . method === 'OPTIONS' ) {
You can’t perform that action at this time.
0 commit comments