Skip to content

Commit

Permalink
feat: return variables after execute (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Mar 26, 2023
1 parent 7e331fe commit 4f87fbe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/plugins/javascript/httpyacJsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class HttpyacJsApi {
utils.setVariableInContext(vars, this.context);
}

async execute(httpRegion: models.HttpRegion | string, vars?: models.Variables): Promise<boolean> {
async execute(httpRegion: models.HttpRegion | string, vars?: models.Variables): Promise<models.Variables> {
if (vars) {
utils.setVariableInContext(vars, this.context);
}
Expand All @@ -35,8 +35,7 @@ export class HttpyacJsApi {
const envKey = utils.toEnvironmentKey(this.context.httpFile.activeEnvironment);
utils.setVariableInContext(obj.variablesPerEnv[envKey], this.context);
}
return result;
}
return false;
return this.context.variables;
}
}

0 comments on commit 4f87fbe

Please sign in to comment.