Unverified Commit bd0feb64 authored by Dan Jones's avatar Dan Jones
Browse files

fix: assign schema to this.schema not promise

parent 8ad9f7d7
...@@ -135,11 +135,11 @@ class GenericSoarProtocol extends GenericProtocol { ...@@ -135,11 +135,11 @@ class GenericSoarProtocol extends GenericProtocol {
let repository = "https://git.noc.ac.uk/communications-backbone-system/backbone-message-format"; let repository = "https://git.noc.ac.uk/communications-backbone-system/backbone-message-format";
// TODO check this path resolves for tags // TODO check this path resolves for tags
let url = `${repository}/-/raw/${version}/project/soar/swagger.json`; let url = `${repository}/-/raw/${version}/project/soar/swagger.json`;
this.schema = this.axios.get(url) return this.axios.get(url)
.then((response) => { .then((response) => {
this.schema = response.data;
return response.data; return response.data;
}); });
return this.schema;
} }
/** /**
......
...@@ -137,11 +137,11 @@ class GenericSoarProtocol extends GenericProtocol { ...@@ -137,11 +137,11 @@ class GenericSoarProtocol extends GenericProtocol {
let repository = "https://git.noc.ac.uk/communications-backbone-system/backbone-message-format"; let repository = "https://git.noc.ac.uk/communications-backbone-system/backbone-message-format";
// TODO check this path resolves for tags // TODO check this path resolves for tags
let url = `${repository}/-/raw/${version}/project/soar/swagger.json`; let url = `${repository}/-/raw/${version}/project/soar/swagger.json`;
this.schema = this.axios.get(url) return this.axios.get(url)
.then((response) => { .then((response) => {
this.schema = response.data;
return response.data; return response.data;
}); });
return this.schema;
} }
/** /**
......
...@@ -135,11 +135,11 @@ export class GenericSoarProtocol extends GenericProtocol { ...@@ -135,11 +135,11 @@ export class GenericSoarProtocol extends GenericProtocol {
let repository = "https://git.noc.ac.uk/communications-backbone-system/backbone-message-format"; let repository = "https://git.noc.ac.uk/communications-backbone-system/backbone-message-format";
// TODO check this path resolves for tags // TODO check this path resolves for tags
let url = `${repository}/-/raw/${version}/project/soar/swagger.json`; let url = `${repository}/-/raw/${version}/project/soar/swagger.json`;
this.schema = this.axios.get(url) return this.axios.get(url)
.then((response) => { .then((response) => {
this.schema = response.data
return response.data; return response.data;
}); });
return this.schema;
} }
/** /**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment