mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-17 09:00:06 +00:00
style: lint
This commit is contained in:
@@ -49,7 +49,11 @@ export class FileUploader {
|
|||||||
const csrfToken = this.requestClient.getCsrfToken('file')
|
const csrfToken = this.requestClient.getCsrfToken('file')
|
||||||
if (csrfToken) formData.append('_csrf', csrfToken.value)
|
if (csrfToken) formData.append('_csrf', csrfToken.value)
|
||||||
if (this.sasjsConfig.debug) formData.append('_debug', '131')
|
if (this.sasjsConfig.debug) formData.append('_debug', '131')
|
||||||
if (this.sasjsConfig.serverType === ServerType.SasViya && this.sasjsConfig.contextName) formData.append('_contextname', this.sasjsConfig.contextName)
|
if (
|
||||||
|
this.sasjsConfig.serverType === ServerType.SasViya &&
|
||||||
|
this.sasjsConfig.contextName
|
||||||
|
)
|
||||||
|
formData.append('_contextname', this.sasjsConfig.contextName)
|
||||||
|
|
||||||
const headers = {
|
const headers = {
|
||||||
'cache-control': 'no-cache',
|
'cache-control': 'no-cache',
|
||||||
@@ -62,10 +66,10 @@ export class FileUploader {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
let result
|
let result
|
||||||
|
|
||||||
result = typeof res.result === 'string' ? JSON.parse(res.result) : res.result
|
result =
|
||||||
|
typeof res.result === 'string' ? JSON.parse(res.result) : res.result
|
||||||
//TODO: append to SASjs requests
|
//TODO: append to SASjs requests
|
||||||
}
|
})
|
||||||
)
|
|
||||||
.catch((err: Error) => {
|
.catch((err: Error) => {
|
||||||
if (err instanceof LoginRequiredError) {
|
if (err instanceof LoginRequiredError) {
|
||||||
return Promise.reject(
|
return Promise.reject(
|
||||||
|
|||||||
Reference in New Issue
Block a user