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

style: lint

This commit is contained in:
2021-03-28 18:40:22 +02:00
parent 28370341d8
commit 23db0ac80d

View File

@@ -82,13 +82,17 @@ export class AuthManager {
* @returns - a promise which resolves with an object containing two values - a boolean `isLoggedIn`, and a string `userName`. * @returns - a promise which resolves with an object containing two values - a boolean `isLoggedIn`, and a string `userName`.
*/ */
public async checkSession() { public async checkSession() {
const { result: loginResponse } = await this.requestClient.get<string>( const { result: loginResponse } = await this.requestClient
`${this.serverUrl}/${this.serverType === 'SASVIYA' ? 'SASJobExecution' : 'SASStoredProcess'}`, .get<string>(
undefined, `${this.serverUrl}/${
'text/plain' this.serverType === 'SASVIYA' ? 'SASJobExecution' : 'SASStoredProcess'
).catch((err: any) => { }`,
return {result: 'authErr'} undefined,
}) 'text/plain'
)
.catch((err: any) => {
return { result: 'authErr' }
})
const isLoggedIn = loginResponse !== 'authErr' const isLoggedIn = loginResponse !== 'authErr'
let loginForm = null let loginForm = null
@@ -96,13 +100,13 @@ export class AuthManager {
if (!isLoggedIn) { if (!isLoggedIn) {
//We will logout to make sure cookies are removed and login form is presented //We will logout to make sure cookies are removed and login form is presented
this.logOut() this.logOut()
const { result: formResponse } = await this.requestClient.get<string>( const { result: formResponse } = await this.requestClient.get<string>(
this.loginUrl.replace('do', ''), this.loginUrl.replace('do', ''),
undefined, undefined,
'text/plain' 'text/plain'
) )
loginForm = await this.getLoginForm(formResponse) loginForm = await this.getLoginForm(formResponse)
} }