mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 12:30:06 +00:00
chore: prettier
This commit is contained in:
@@ -38,9 +38,10 @@ export class ContextManager {
|
|||||||
|
|
||||||
public async getComputeContexts(accessToken?: string) {
|
public async getComputeContexts(accessToken?: string) {
|
||||||
const { result: contexts } = await this.requestClient
|
const { result: contexts } = await this.requestClient
|
||||||
.get<{
|
.get<{ items: Context[] }>(
|
||||||
items: Context[]
|
`${this.serverUrl}/compute/contexts?limit=10000`,
|
||||||
}>(`${this.serverUrl}/compute/contexts?limit=10000`, accessToken)
|
accessToken
|
||||||
|
)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
throw prefixMessage(err, 'Error while getting compute contexts. ')
|
throw prefixMessage(err, 'Error while getting compute contexts. ')
|
||||||
})
|
})
|
||||||
@@ -58,9 +59,10 @@ export class ContextManager {
|
|||||||
|
|
||||||
public async getLauncherContexts(accessToken?: string) {
|
public async getLauncherContexts(accessToken?: string) {
|
||||||
const { result: contexts } = await this.requestClient
|
const { result: contexts } = await this.requestClient
|
||||||
.get<{
|
.get<{ items: Context[] }>(
|
||||||
items: Context[]
|
`${this.serverUrl}/launcher/contexts?limit=10000`,
|
||||||
}>(`${this.serverUrl}/launcher/contexts?limit=10000`, accessToken)
|
accessToken
|
||||||
|
)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
throw prefixMessage(err, 'Error while getting launcher contexts. ')
|
throw prefixMessage(err, 'Error while getting launcher contexts. ')
|
||||||
})
|
})
|
||||||
@@ -289,9 +291,7 @@ export class ContextManager {
|
|||||||
accessToken?: string
|
accessToken?: string
|
||||||
): Promise<Context> {
|
): Promise<Context> {
|
||||||
const { result: contexts } = await this.requestClient
|
const { result: contexts } = await this.requestClient
|
||||||
.get<{
|
.get<{ items: Context[] }>(
|
||||||
items: Context[]
|
|
||||||
}>(
|
|
||||||
`${this.serverUrl}/compute/contexts?filter=eq(name, "${contextName}")`,
|
`${this.serverUrl}/compute/contexts?filter=eq(name, "${contextName}")`,
|
||||||
accessToken
|
accessToken
|
||||||
)
|
)
|
||||||
@@ -332,9 +332,7 @@ export class ContextManager {
|
|||||||
authConfig?: AuthConfig
|
authConfig?: AuthConfig
|
||||||
) {
|
) {
|
||||||
const { result: contexts } = await this.requestClient
|
const { result: contexts } = await this.requestClient
|
||||||
.get<{
|
.get<{ items: Context[] }>(
|
||||||
items: Context[]
|
|
||||||
}>(
|
|
||||||
`${this.serverUrl}/compute/contexts?limit=10000`,
|
`${this.serverUrl}/compute/contexts?limit=10000`,
|
||||||
authConfig?.access_token
|
authConfig?.access_token
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user