@kravc/dos 1.11.18 → 1.11.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kravc/dos",
3
- "version": "1.11.18",
3
+ "version": "1.11.19",
4
4
  "description": "Convention-based, easy-to-use library for building API-driven serverless services.",
5
5
  "keywords": [
6
6
  "Service",
@@ -291,7 +291,7 @@ describe('Service', () => {
291
291
  expect(response.statusCode).to.eql(201)
292
292
 
293
293
  request = {
294
- url: 'http://localhost:3000/api/UpdateProfile?id=HELLO_WORLD',
294
+ url: 'http://localhost:3000/api/UpdateProfile?id=HELLO_WORLD&tags=["tag1","tag2"]',
295
295
  body: JSON.stringify({ name: 'HTTP test!' }),
296
296
  method: 'PATCH',
297
297
  headers: { authorization }
@@ -65,6 +65,18 @@ const createContext = (service, request, extraContext = {}) => {
65
65
  context.query = queryStringParameters
66
66
  }
67
67
 
68
+ const queryKeys = Object.keys(context.query)
69
+
70
+ for (const queryKey of queryKeys) {
71
+ const value = context.query[queryKey]
72
+
73
+ const isJsonArray = `${value}`.startsWith('["')
74
+
75
+ if (isJsonArray) {
76
+ context.query[queryKey] = JSON.parse(value)
77
+ }
78
+ }
79
+
68
80
  if (body) {
69
81
  const isJSON = isString(body)
70
82