@mcma/api
Advanced tools
Comparing version 0.13.14 to 0.13.15
@@ -21,3 +21,3 @@ "use strict"; | ||
async handleRequest(requestContext) { | ||
var _a; | ||
var _a, _b; | ||
const request = requestContext.request; | ||
@@ -118,3 +118,3 @@ const response = requestContext.response; | ||
} | ||
if (response.body) { | ||
if (response.body && ((_b = response.headers[Object.keys(response.headers).find(h => h.toLowerCase() === "content-type")]) === null || _b === void 0 ? void 0 : _b.toLowerCase().startsWith("application/json"))) { | ||
response.body = JSON.stringify(response.body); | ||
@@ -121,0 +121,0 @@ } |
@@ -14,4 +14,3 @@ "use strict"; | ||
this.create.onStarted = reqCtx => this.onJobAssignmentCreationStarted(reqCtx); | ||
this.create.onCompleted = | ||
(reqCtx, jobAssignment) => this.onJobAssignmentCreationCompleted(reqCtx, jobAssignment); | ||
this.create.onCompleted = (reqCtx, jobAssignment) => this.onJobAssignmentCreationCompleted(reqCtx, jobAssignment); | ||
} | ||
@@ -26,7 +25,11 @@ async onJobAssignmentCreationStarted(requestContext) { | ||
async onJobAssignmentCreationCompleted(requestContext, jobAssignment) { | ||
await this.workerInvoker.invoke(context_variable_provider_ext_1.getWorkerFunctionId(requestContext), "ProcessJobAssignment", requestContext.getAllContextVariables(), { | ||
jobAssignmentDatabaseId: jobAssignment.id.replace(context_variable_provider_ext_1.getPublicUrl(requestContext), "") | ||
}, jobAssignment.tracker); | ||
await this.workerInvoker.invoke(context_variable_provider_ext_1.getWorkerFunctionId(requestContext), { | ||
operationName: "ProcessJobAssignment", | ||
input: { | ||
jobAssignmentDatabaseId: jobAssignment.id.replace(context_variable_provider_ext_1.getPublicUrl(requestContext), "") | ||
}, | ||
tracker: jobAssignment.tracker | ||
}); | ||
} | ||
} | ||
exports.DefaultJobRouteCollection = DefaultJobRouteCollection; |
{ | ||
"name": "@mcma/api", | ||
"version": "0.13.14", | ||
"version": "0.13.15", | ||
"description": "Node module for building APIs based on the EBU MCMA framework", | ||
@@ -40,12 +40,12 @@ "engines": { | ||
"peerDependencies": { | ||
"@mcma/client": "0.13.14", | ||
"@mcma/core": "0.13.14", | ||
"@mcma/data": "0.13.14", | ||
"@mcma/worker-invoker": "0.13.14" | ||
"@mcma/client": "0.13.15", | ||
"@mcma/core": "0.13.15", | ||
"@mcma/data": "0.13.15", | ||
"@mcma/worker-invoker": "0.13.15" | ||
}, | ||
"devDependencies": { | ||
"@mcma/client": "0.13.14", | ||
"@mcma/core": "0.13.14", | ||
"@mcma/data": "0.13.14", | ||
"@mcma/worker-invoker": "0.13.14", | ||
"@mcma/client": "0.13.15", | ||
"@mcma/core": "0.13.15", | ||
"@mcma/data": "0.13.15", | ||
"@mcma/worker-invoker": "0.13.15", | ||
"@types/node": "^13.7.4", | ||
@@ -52,0 +52,0 @@ "@types/pluralize": "0.0.29", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58532
1211