1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-07 20:40:05 +00:00

fix: sasjs server type - request and job execution auth fix

This commit is contained in:
2022-04-26 16:18:36 +02:00
parent 4ebf949912
commit 936e4f8c0a
3 changed files with 36 additions and 22 deletions

View File

@@ -43,7 +43,9 @@ export class SASjsApiClient {
return Promise.resolve(result)
}
public async executeJob(query: ExecutionQuery) {
public async executeJob(query: ExecutionQuery, authConfig?: AuthConfig) {
const access_token = authConfig ? authConfig.access_token : undefined
const { result } = await this.requestClient.post<{
status: string
message: string
@@ -51,7 +53,7 @@ export class SASjsApiClient {
logPath?: string
error?: {}
_webout?: string
}>('SASjsApi/stp/execute', query, undefined)
}>('SASjsApi/stp/execute', query, access_token)
if (Object.keys(result).includes('_webout')) {
result._webout = parseWeboutResponse(result._webout!)