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

chore(refactor): remove unnecessary variables, use jobs path from config

This commit is contained in:
Krishna Acondy
2021-05-27 08:40:50 +01:00
parent e9affb862d
commit 9676488ff2
2 changed files with 8 additions and 12 deletions

View File

@@ -21,12 +21,12 @@ export class Sas9RequestClient extends RequestClient {
}
}
public async login(username: string, password: string) {
public async login(username: string, password: string, jobsPath: string) {
const codeInjectorPath = `/User Folders/${username}/My Folder/sasjs/runner`
if (this.httpClient.defaults.jar) {
;(this.httpClient.defaults.jar as tough.CookieJar).removeAllCookies()
await this.get(
`/SASStoredProcess/do?_program=${codeInjectorPath}&_username=${username}&_password=${password}`,
`${jobsPath}?_program=${codeInjectorPath}&_username=${username}&_password=${password}`,
undefined,
'text/plain'
)