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

fix(lint): fixed code style

This commit is contained in:
Yury Shkoda
2021-03-09 09:44:10 +03:00
parent a977f59675
commit 9d27451813
4 changed files with 14 additions and 16 deletions

View File

@@ -314,9 +314,7 @@ export class ContextManager {
contextId: string, contextId: string,
accessToken?: string accessToken?: string
): Promise<ContextAllAttributes> { ): Promise<ContextAllAttributes> {
const { const { result: context } = await this.requestClient
result: context
} = await this.requestClient
.get<ContextAllAttributes>( .get<ContextAllAttributes>(
`${this.serverUrl}/compute/contexts/${contextId}`, `${this.serverUrl}/compute/contexts/${contextId}`,
accessToken accessToken

View File

@@ -571,9 +571,9 @@ export class SASViyaApiClient {
} }
} }
const { const { result: createFolderResponse } = await this.requestClient.post<
result: createFolderResponse Folder
} = await this.requestClient.post<Folder>( >(
`/folders/folders?parentFolderUri=${parentFolderUri}`, `/folders/folders?parentFolderUri=${parentFolderUri}`,
{ {
name: folderName, name: folderName,
@@ -852,9 +852,7 @@ export class SASViyaApiClient {
throw new Error(`URI of job definition was not found.`) throw new Error(`URI of job definition was not found.`)
} }
const { const { result: jobDefinition } = await this.requestClient
result: jobDefinition
} = await this.requestClient
.get<JobDefinition>( .get<JobDefinition>(
`${this.serverUrl}${jobDefinitionLink.href}`, `${this.serverUrl}${jobDefinitionLink.href}`,
accessToken accessToken

View File

@@ -91,10 +91,7 @@ export class SessionManager {
} }
private async createAndWaitForSession(accessToken?: string) { private async createAndWaitForSession(accessToken?: string) {
const { const { result: createdSession, etag } = await this.requestClient
result: createdSession,
etag
} = await this.requestClient
.post<Session>( .post<Session>(
`${this.serverUrl}/compute/contexts/${ `${this.serverUrl}/compute/contexts/${
this.currentContext!.id this.currentContext!.id

View File

@@ -97,9 +97,14 @@ export class RequestClient implements HttpClient {
}) })
.catch(async (e) => { .catch(async (e) => {
return await this.handleError(e, () => return await this.handleError(e, () =>
this.get<T>(url, accessToken, contentType, overrideHeaders).catch((err) => { this.get<T>(url, accessToken, contentType, overrideHeaders).catch(
throw prefixMessage(err, 'Error while executing handle error callback. ') (err) => {
}) throw prefixMessage(
err,
'Error while executing handle error callback. '
)
}
)
).catch((err) => { ).catch((err) => {
throw prefixMessage(err, 'Error while handling error. ') throw prefixMessage(err, 'Error while handling error. ')
}) })