Unverified Commit 8ad9f7d7 authored by Dan Jones's avatar Dan Jones
Browse files

fix: remove await in schema loading

parent 37bffb9c
......@@ -114,9 +114,9 @@ class GenericSoarProtocol extends GenericProtocol {
* @param {string|object} schema
* @returns {object}
*/
async createValidator(schema) {
createValidator(schema) {
if (typeof schema === 'string' && schema.match(/^[\w\.]+$/)) {
return await this.loadSchema(schema)
return this.loadSchema(schema)
.then((schema) => {
return new Validator(schema);
});
......@@ -125,7 +125,6 @@ class GenericSoarProtocol extends GenericProtocol {
}
}
/**
* Load schema from gitlab by tag/branch/commitref
* @param {string} version
......
......@@ -116,9 +116,9 @@ class GenericSoarProtocol extends GenericProtocol {
* @param {string|object} schema
* @returns {object}
*/
async createValidator(schema) {
createValidator(schema) {
if (typeof schema === 'string' && schema.match(/^[\w\.]+$/)) {
return await this.loadSchema(schema)
return this.loadSchema(schema)
.then((schema) => {
return new Validator(schema);
});
......@@ -127,7 +127,6 @@ class GenericSoarProtocol extends GenericProtocol {
}
}
/**
* Load schema from gitlab by tag/branch/commitref
* @param {string} version
......
......@@ -114,9 +114,9 @@ export class GenericSoarProtocol extends GenericProtocol {
* @param {string|object} schema
* @returns {object}
*/
async createValidator(schema) {
createValidator(schema) {
if (typeof schema === 'string' && schema.match(/^[\w\.]+$/)) {
return await this.loadSchema(schema)
return this.loadSchema(schema)
.then((schema) => {
return new Validator(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