Remove controller.datasource usages
This commit is contained in:
parent
12a08c6864
commit
39d0382a56
|
@ -799,18 +799,14 @@ class TestConfiguration {
|
||||||
datasource: Datasource
|
datasource: Datasource
|
||||||
}): Promise<Datasource> {
|
}): Promise<Datasource> {
|
||||||
config = config || basicDatasource()
|
config = config || basicDatasource()
|
||||||
const response = await this._req(config, null, controllers.datasource.save)
|
const response = await this.api.datasource.create(config.datasource)
|
||||||
this.datasource = response.datasource
|
this.datasource = response
|
||||||
return this.datasource!
|
return this.datasource!
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateDatasource(datasource: Datasource): Promise<Datasource> {
|
async updateDatasource(datasource: Datasource): Promise<Datasource> {
|
||||||
const response = await this._req(
|
const response = await this.api.datasource.update(datasource)
|
||||||
datasource,
|
this.datasource = response
|
||||||
{ datasourceId: datasource._id },
|
|
||||||
controllers.datasource.update
|
|
||||||
)
|
|
||||||
this.datasource = response.datasource
|
|
||||||
return this.datasource!
|
return this.datasource!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue