@@ -25,13 +25,10 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
25
25
let service : ProductService
26
26
let operation : Operation
27
27
28
- func handle( context: Lambda . Context , event: APIGateway . V2 . Request ) -> EventLoopFuture <
29
- APIGateway . V2 . Response
30
- > {
28
+ func handle( context: Lambda . Context , event: APIGateway . V2 . Request ) -> EventLoopFuture < APIGateway . V2 . Response > {
31
29
32
30
switch operation {
33
31
case . create:
34
- logger. info ( " create " )
35
32
let create = CreateLambdaHandler ( service: service) . handle ( context: context, event: event)
36
33
. flatMap { response -> EventLoopFuture < APIGateway . V2 . Response > in
37
34
switch response {
@@ -45,7 +42,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
45
42
}
46
43
return create
47
44
case . read:
48
- logger. info ( " read " )
49
45
let read = ReadLambdaHandler ( service: service) . handle ( context: context, event: event)
50
46
. flatMap { response -> EventLoopFuture < APIGateway . V2 . Response > in
51
47
switch response {
@@ -59,7 +55,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
59
55
}
60
56
return read
61
57
case . update:
62
- logger. info ( " update " )
63
58
let update = UpdateLambdaHandler ( service: service) . handle ( context: context, event: event)
64
59
. flatMap { response -> EventLoopFuture < APIGateway . V2 . Response > in
65
60
switch response {
@@ -73,7 +68,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
73
68
}
74
69
return update
75
70
case . delete:
76
- logger. info ( " delete " )
77
71
let delete = DeleteUpdateLambdaHandler ( service: service) . handle (
78
72
context: context, event: event
79
73
)
@@ -89,7 +83,6 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
89
83
}
90
84
return delete
91
85
case . list:
92
- logger. info ( " list " )
93
86
let list = ListUpdateLambdaHandler ( service: service) . handle ( context: context, event: event)
94
87
. flatMap { response -> EventLoopFuture < APIGateway . V2 . Response > in
95
88
switch response {
@@ -113,9 +106,7 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
113
106
self . service = service
114
107
}
115
108
116
- func handle( context: Lambda . Context , event: APIGateway . V2 . Request ) -> EventLoopFuture <
117
- Result < Product , Error >
118
- > {
109
+ func handle( context: Lambda . Context , event: APIGateway . V2 . Request ) -> EventLoopFuture < Result < Product , Error > > {
119
110
120
111
guard let product: Product = try ? event. object ( ) else {
121
112
let error = APIError . invalidRequest
@@ -137,9 +128,7 @@ struct ProductLambdaHandler: EventLoopLambdaHandler {
137
128
self . service = service
138
129
}
139
130
140
- func handle( context: Lambda . Context , event: APIGateway . V2 . Request ) -> EventLoopFuture <
141
- Result < Product , Error >
142
- > {
131
+ func handle( context: Lambda . Context , event: APIGateway . V2 . Request ) -> EventLoopFuture < Result < Product , Error > > {
143
132
144
133
guard let sku = event. pathParameters ? [ " sku " ] else {
145
134
let error = APIError . invalidRequest
0 commit comments