diff --git a/api/lambda.go b/api/lambda.go index cacfdd051b1786aa87e076149807979a2affffe2..5e8e23f84bb538f92bf8f2826db376fc094685c8 100644 --- a/api/lambda.go +++ b/api/lambda.go @@ -260,7 +260,12 @@ func (api Api) Handler(baseCtx context.Context, apiGatewayProxyReq events.APIGat //handler succeeded, some handler does not have a response data (typically post/put/patch/delete) err = nil - res.StatusCode = http.StatusOK + switch apiGatewayProxyReq.HTTPMethod { + case http.MethodDelete: + res.StatusCode = http.StatusNoContent + default: + res.StatusCode = http.StatusOK + } if len(results) > 1 { responseStruct := results[0].Interface()