Skip to content
Snippets Groups Projects
Commit 602596ed authored by Steve Reis's avatar Steve Reis
Browse files

fix(datashield): Swap covariables and variables

parent 4084e2ed
No related branches found
No related tags found
No related merge requests found
...@@ -273,14 +273,14 @@ export default class DataShieldConnector implements Connector { ...@@ -273,14 +273,14 @@ export default class DataShieldConnector implements Connector {
const path = new URL('/runAlgorithm', this.options.baseurl); const path = new URL('/runAlgorithm', this.options.baseurl);
// Covariable and variable are inversed in Datashield API // Covariable and variable are inversed in Datashield API
const coVariable = const variable =
experiment.variables.length > 0 ? experiment.variables[0] : undefined; experiment.variables.length > 0 ? experiment.variables[0] : undefined;
const expToInput = { const expToInput = {
algorithm: { algorithm: {
id: experiment.algorithm.name, id: experiment.algorithm.name,
coVariable, variable,
variables: experiment.coVariables, covariables: experiment.coVariables,
}, },
datasets: experiment.datasets, datasets: experiment.datasets,
}; };
...@@ -293,13 +293,13 @@ export default class DataShieldConnector implements Connector { ...@@ -293,13 +293,13 @@ export default class DataShieldConnector implements Connector {
} }
}); });
const result = await firstValueFrom( const { data } = await firstValueFrom(
this.httpService.post(path.href, expToInput, { this.httpService.post(path.href, expToInput, {
headers: { cookie, 'Content-Type': 'application/json' }, headers: { cookie, 'Content-Type': 'application/json' },
}), }),
); );
handlers(experiment, result.data, vars); handlers(experiment, data, vars);
} }
async logout(request: Request): Promise<void> { async logout(request: Request): Promise<void> {
......
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