@felloh-org/lambda-wrapper 1.11.58 → 1.11.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/service/request.js +1 -7
- package/package.json +1 -1
package/dist/service/request.js
CHANGED
|
@@ -154,7 +154,6 @@ class Request extends _dependencyAware.default {
|
|
|
154
154
|
|
|
155
155
|
getAll(requestType = null) {
|
|
156
156
|
const event = this.getContainer().getEvent();
|
|
157
|
-
console.log('raw event', event);
|
|
158
157
|
|
|
159
158
|
if (HTTP_METHODS_WITHOUT_PAYLOADS.includes(event.httpMethod) || HTTP_METHODS_WITHOUT_PAYLOADS.includes(requestType)) {
|
|
160
159
|
// get simple parameters
|
|
@@ -170,17 +169,14 @@ class Request extends _dependencyAware.default {
|
|
|
170
169
|
if (HTTP_METHODS_WITH_PAYLOADS.includes(event.httpMethod) || HTTP_METHODS_WITH_PAYLOADS.includes(requestType)) {
|
|
171
170
|
const contentType = this.getHeader('Content-Type', this.getHeader('content-type'));
|
|
172
171
|
let queryParameters = {};
|
|
173
|
-
console.log('content-type', contentType);
|
|
174
172
|
|
|
175
173
|
if (contentType.includes('application/x-www-form-urlencoded')) {
|
|
176
174
|
queryParameters = _querystring.default.parse(event.body);
|
|
177
175
|
}
|
|
178
176
|
|
|
179
|
-
console.log('event body', typeof event.body);
|
|
180
|
-
|
|
181
177
|
if (contentType.includes('application/json')) {
|
|
182
178
|
try {
|
|
183
|
-
if (typeof event.body) {
|
|
179
|
+
if (typeof event.body === 'object') {
|
|
184
180
|
queryParameters = event.body;
|
|
185
181
|
} else {
|
|
186
182
|
queryParameters = JSON.parse(event.body);
|
|
@@ -201,7 +197,6 @@ class Request extends _dependencyAware.default {
|
|
|
201
197
|
queryParameters = this.parseForm(true);
|
|
202
198
|
}
|
|
203
199
|
|
|
204
|
-
console.log(queryParameters);
|
|
205
200
|
return queryParameters;
|
|
206
201
|
}
|
|
207
202
|
|
|
@@ -269,7 +264,6 @@ class Request extends _dependencyAware.default {
|
|
|
269
264
|
if (typeof validation === 'undefined') {
|
|
270
265
|
resolve();
|
|
271
266
|
} else {
|
|
272
|
-
console.log(this.getAll(), validation);
|
|
273
267
|
Logger.label('request-validation-failed');
|
|
274
268
|
const validationErrorResponse = new _response.default({}, 422);
|
|
275
269
|
Object.keys(validation).forEach(validationKey => {
|