feat: fetch modelInfo
gitea/mylogger/pipeline/pr-master This commit looks good
Details
gitea/mylogger/pipeline/pr-master This commit looks good
Details
This commit is contained in:
parent
011ed225a2
commit
fd57221ea8
12
lib/salix.js
12
lib/salix.js
|
@ -142,11 +142,12 @@ module.exports = class Salix {
|
|||
`${this.conf.salix.url}/${path}`,
|
||||
fetchConfig
|
||||
);
|
||||
if (salixCall.status !== 200) {
|
||||
throw new Error(response);
|
||||
}
|
||||
const responseText = await salixCall.text();
|
||||
const response = JSON.parse(responseText);
|
||||
|
||||
if (salixCall.status !== 200) {
|
||||
throw new Error(response.error.message);
|
||||
}
|
||||
|
||||
const newVersion = salixCall.headers.get(SALIX_VERSION_HEADER);
|
||||
if (!this.salixVersion) {
|
||||
|
@ -172,14 +173,13 @@ module.exports = class Salix {
|
|||
async getSalixVersion() {
|
||||
this.log("CHECK VERSION");
|
||||
|
||||
await this.fetch(this.conf.salix.api.status);
|
||||
await this.fetch(this.conf.salix.api.modelinfo);
|
||||
|
||||
this.log("VERSION CHECKED");
|
||||
this.log("VERSION CHECKED -- "+ this.salixVersion);
|
||||
}
|
||||
|
||||
async salixLogInfo() {
|
||||
this.log("REQUEST LOGINFO");
|
||||
await this.getToken();
|
||||
let salixLogConfig = await this.fetch(this.conf.salix.api.logInfo);
|
||||
|
||||
this._logInfo = salixLogConfig;
|
||||
|
|
Loading…
Reference in New Issue