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 = {
|
const body = {
|
||||||
versionId: "0.1",
|
versionId: "0.1",
|
||||||
isStaging: false,
|
isStaging: false,
|
||||||
directVersionPublish: false
|
directVersionPublish: true
|
||||||
}
|
}
|
||||||
const req = new WebResource();
|
const req = new WebResource();
|
||||||
req.method = 'POST';
|
req.method = 'POST';
|
||||||
|
@ -743,7 +743,7 @@ export class AzureDeployerService implements IGBInstallationDeployer {
|
||||||
req.headers.set('Content-Type', 'application/json');
|
req.headers.set('Content-Type', 'application/json');
|
||||||
req.headers.set('accept-language', '*');
|
req.headers.set('accept-language', '*');
|
||||||
req.headers.set('Ocp-Apim-Subscription-Key', nlpAuthoringKey);
|
req.headers.set('Ocp-Apim-Subscription-Key', nlpAuthoringKey);
|
||||||
req.body = body;
|
req.body = JSON.stringify(body);
|
||||||
const httpClient = new ServiceClient();
|
const httpClient = new ServiceClient();
|
||||||
|
|
||||||
return await httpClient.sendRequest(req);
|
return await httpClient.sendRequest(req);
|
||||||
|
|
|
@ -252,7 +252,7 @@ export class GBDeployer implements IGBDeployer {
|
||||||
instance.nlpAppId,
|
instance.nlpAppId,
|
||||||
instance.nlpAuthoringKey,
|
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.nlpAppId,
|
||||||
instance.nlpAuthoringKey,
|
instance.nlpAuthoringKey,
|
||||||
);
|
);
|
||||||
if(res.status !== 200) throw res.bodyAsText;
|
if(res.status !== 200 && res.status !== 202) throw res.bodyAsText;
|
||||||
let sleep = ms => {
|
let sleep = ms => {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
setTimeout(resolve, ms);
|
setTimeout(resolve, ms);
|
||||||
|
|
Loading…
Add table
Reference in a new issue