eddev 2.0.0-beta.171 → 2.0.0-beta.172
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.
|
@@ -337,18 +337,18 @@ export function createVinxiCodegen(opts) {
|
|
|
337
337
|
const id = "/" + getRouterParam(event, "name")
|
|
338
338
|
const paramString = getQuery(event).params
|
|
339
339
|
|
|
340
|
-
let params =
|
|
340
|
+
let params = {}
|
|
341
341
|
try {
|
|
342
342
|
params = typeof paramString === "string" && paramString.length ? JSON.parse(paramString) : {}
|
|
343
343
|
} catch (e) {
|
|
344
344
|
throw new Error("Invalid query parameters")
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
|
|
348
|
-
return
|
|
349
|
-
}
|
|
350
|
-
throw new Error("Error fetching query:"+JSON.stringify(err))
|
|
351
|
-
}
|
|
347
|
+
try {
|
|
348
|
+
return await serverContext.fetchNamedQuery({ name: id, params: params, headers: getRequestHeaders(event) })
|
|
349
|
+
} catch (err) {
|
|
350
|
+
throw new Error("Error fetching query: "+JSON.stringify(err))
|
|
351
|
+
}
|
|
352
352
|
}),
|
|
353
353
|
)
|
|
354
354
|
.get(
|