mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-16 00:20:06 +00:00
style: lint
This commit is contained in:
@@ -415,22 +415,22 @@ export default class SASjs {
|
|||||||
const pattern: RegExp = /<form.+action="(.*Logon[^"]*).*>/
|
const pattern: RegExp = /<form.+action="(.*Logon[^"]*).*>/
|
||||||
const matches = pattern.exec(response)
|
const matches = pattern.exec(response)
|
||||||
const formInputs: any = {}
|
const formInputs: any = {}
|
||||||
|
|
||||||
if (matches && matches.length) {
|
if (matches && matches.length) {
|
||||||
this.setLoginUrl(matches)
|
this.setLoginUrl(matches)
|
||||||
const inputs = response.match(/<input.*"hidden"[^>]*>/g)
|
const inputs = response.match(/<input.*"hidden"[^>]*>/g)
|
||||||
|
|
||||||
if (inputs) {
|
if (inputs) {
|
||||||
inputs.forEach((inputStr: string) => {
|
inputs.forEach((inputStr: string) => {
|
||||||
const valueMatch = inputStr.match(/name="([^"]*)"\svalue="([^"]*)/)
|
const valueMatch = inputStr.match(/name="([^"]*)"\svalue="([^"]*)/)
|
||||||
|
|
||||||
if (valueMatch && valueMatch.length) {
|
if (valueMatch && valueMatch.length) {
|
||||||
formInputs[valueMatch[1]] = valueMatch[2]
|
formInputs[valueMatch[1]] = valueMatch[2]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Object.keys(formInputs).length ? formInputs : null
|
return Object.keys(formInputs).length ? formInputs : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user