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

chore(*): change code style to use single quote

This commit is contained in:
Yury Shkoda
2020-09-01 14:28:15 +03:00
parent 82b14fad14
commit c626c57662
28 changed files with 404 additions and 404 deletions

View File

@@ -5,18 +5,18 @@ export const parseAndSubmitAuthorizeForm = async (
let authUrl: string | null = null
const params: any = {}
const responseBody = response.split("<body>")[1].split("</body>")[0]
const bodyElement = document.createElement("div")
const responseBody = response.split('<body>')[1].split('</body>')[0]
const bodyElement = document.createElement('div')
bodyElement.innerHTML = responseBody
const form = bodyElement.querySelector("#application_authorization")
authUrl = form ? serverUrl + form.getAttribute("action") : null
const form = bodyElement.querySelector('#application_authorization')
authUrl = form ? serverUrl + form.getAttribute('action') : null
const inputs: any = form?.querySelectorAll("input")
const inputs: any = form?.querySelectorAll('input')
for (const input of inputs) {
if (input.name === "user_oauth_approval") {
input.value = "true"
if (input.name === 'user_oauth_approval') {
input.value = 'true'
}
params[input.name] = input.value
@@ -33,17 +33,17 @@ export const parseAndSubmitAuthorizeForm = async (
return new Promise((resolve, reject) => {
if (authUrl) {
fetch(authUrl, {
method: "POST",
credentials: "include",
method: 'POST',
credentials: 'include',
body: formData,
referrerPolicy: "same-origin"
referrerPolicy: 'same-origin'
})
.then((res) => res.text())
.then((res) => {
resolve(res)
})
} else {
reject("Auth form url is null")
reject('Auth form url is null')
}
})
}