Schema.js cleanup (#1540)
* Tidy up schemas router * de-duplicate logic for injecting default schemas * Remove no-op promise * use hasClass * Make getAllSchemas part of SchemaController * Move getOneSchema logic onto schema controller * remove log
This commit is contained in:
@@ -67,7 +67,7 @@ DatabaseController.prototype.loadSchema = function(acceptor = () => true) {
|
||||
if (!this.schemaPromise) {
|
||||
this.schemaPromise = this.schemaCollection().then(collection => {
|
||||
delete this.schemaPromise;
|
||||
return Schema.load(collection);
|
||||
return Schema.load(collection, this.adapter);
|
||||
});
|
||||
return this.schemaPromise;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ DatabaseController.prototype.loadSchema = function(acceptor = () => true) {
|
||||
}
|
||||
this.schemaPromise = this.schemaCollection().then(collection => {
|
||||
delete this.schemaPromise;
|
||||
return Schema.load(collection);
|
||||
return Schema.load(collection, this.adapter);
|
||||
});
|
||||
return this.schemaPromise;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user