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