fix(core.gbapp): NLP composing now is partially automated.
This commit is contained in:
parent
6f6ae57ef2
commit
0aca3853d6
2 changed files with 4 additions and 4 deletions
|
@ -735,7 +735,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
|||
const body = {
|
||||
versionId: "0.1",
|
||||
isStaging: false,
|
||||
directVersionPublish: false
|
||||
directVersionPublish: true
|
||||
}
|
||||
const req = new WebResource();
|
||||
req.method = 'POST';
|
||||
|
@ -743,7 +743,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
|||
req.headers.set('Content-Type', 'application/json');
|
||||
req.headers.set('accept-language', '*');
|
||||
req.headers.set('Ocp-Apim-Subscription-Key', nlpAuthoringKey);
|
||||
req.body = body;
|
||||
req.body = JSON.stringify(body);
|
||||
const httpClient = new ServiceClient();
|
||||
|
||||
return await httpClient.sendRequest(req);
|
||||
|
|
|
@ -252,7 +252,7 @@ export class GBDeployer implements IGBDeployer {
|
|||
instance.nlpAppId,
|
||||
instance.nlpAuthoringKey,
|
||||
);
|
||||
if(res.status !== 200) throw res.bodyAsText;
|
||||
if(res.status !== 200 && res.status !== 201) throw res.bodyAsText;
|
||||
|
||||
}
|
||||
|
||||
|
@ -263,7 +263,7 @@ export class GBDeployer implements IGBDeployer {
|
|||
instance.nlpAppId,
|
||||
instance.nlpAuthoringKey,
|
||||
);
|
||||
if(res.status !== 200) throw res.bodyAsText;
|
||||
if(res.status !== 200 && res.status !== 202) throw res.bodyAsText;
|
||||
let sleep = ms => {
|
||||
return new Promise(resolve => {
|
||||
setTimeout(resolve, ms);
|
||||
|
|
Loading…
Add table
Reference in a new issue