mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-14 15:40:06 +00:00
chore: addressing comments
This commit is contained in:
@@ -13,7 +13,7 @@ const App = (): ReactElement<{}> => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (adapter) {
|
if (adapter) {
|
||||||
let testSuites = [
|
const testSuites = [
|
||||||
basicTests(adapter, config.userName, config.password),
|
basicTests(adapter, config.userName, config.password),
|
||||||
sendArrTests(adapter),
|
sendArrTests(adapter),
|
||||||
sendObjTests(adapter),
|
sendObjTests(adapter),
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export class AuthManager {
|
|||||||
|
|
||||||
this.userName = loginParams.username
|
this.userName = loginParams.username
|
||||||
|
|
||||||
let { isLoggedIn, loginForm } = await this.checkSession()
|
const { isLoggedIn, loginForm } = await this.checkSession()
|
||||||
|
|
||||||
if (isLoggedIn) {
|
if (isLoggedIn) {
|
||||||
await this.loginCallback()
|
await this.loginCallback()
|
||||||
@@ -51,7 +51,7 @@ export class AuthManager {
|
|||||||
|
|
||||||
if (!loggedIn) {
|
if (!loggedIn) {
|
||||||
if (isCredentialsVerifyError(loginResponse)) {
|
if (isCredentialsVerifyError(loginResponse)) {
|
||||||
let newLoginForm = await this.getLoginForm(loginResponse)
|
const newLoginForm = await this.getLoginForm(loginResponse)
|
||||||
|
|
||||||
loginResponse = await this.sendLoginRequest(newLoginForm, loginParams)
|
loginResponse = await this.sendLoginRequest(newLoginForm, loginParams)
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ export class AuthManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async sendLoginRequest(loginForm: any, loginParams: any) {
|
private async sendLoginRequest(loginForm: {[key: string]: any}, loginParams: {[key: string]: any}) {
|
||||||
for (const key in loginForm) {
|
for (const key in loginForm) {
|
||||||
loginParams[key] = loginForm[key]
|
loginParams[key] = loginForm[key]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user