From 39d0382a568069cdf2e8da33704b8150b39f323a Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Fri, 26 Jan 2024 11:11:54 +0100 Subject: [PATCH] Remove controller.datasource usages --- .../server/src/tests/utilities/TestConfiguration.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index e097f2ca27..adb36ee491 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -799,18 +799,14 @@ class TestConfiguration { datasource: Datasource }): Promise { 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 { - 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! }