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

chore(*): add .prettierrc, fix formatting

This commit is contained in:
Krishna Acondy
2020-08-31 09:15:02 +01:00
parent 688221c042
commit 929d7b993b
20 changed files with 225 additions and 209 deletions

View File

@@ -29,12 +29,12 @@ export async function makeRequest<T>(
const token = response.headers.get(tokenHeader);
callback({
headerName: tokenHeader,
value: token || "",
value: token || ""
});
retryRequest = {
...request,
headers: { ...request.headers, [tokenHeader]: token },
headers: { ...request.headers, [tokenHeader]: token }
};
return fetch(url, retryRequest).then((res) => {
etag = res.headers.get("ETag");

View File

@@ -36,7 +36,7 @@ export const parseAndSubmitAuthorizeForm = async (
method: "POST",
credentials: "include",
body: formData,
referrerPolicy: "same-origin",
referrerPolicy: "same-origin"
})
.then((res) => res.text())
.then((res) => {

View File

@@ -1,16 +1,16 @@
export const parseWeboutResponse = (response: string) => {
let sasResponse = "";
let sasResponse = "";
if (response.includes(">>weboutBEGIN<<")) {
try {
sasResponse = response
.split(">>weboutBEGIN<<")[1]
.split(">>weboutEND<<")[0];
} catch (e) {
sasResponse = "";
console.error(e);
}
if (response.includes(">>weboutBEGIN<<")) {
try {
sasResponse = response
.split(">>weboutBEGIN<<")[1]
.split(">>weboutEND<<")[0];
} catch (e) {
sasResponse = "";
console.error(e);
}
}
return sasResponse;
}
return sasResponse;
};