mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-04 19:20:05 +00:00
chore(*): remove console log, add comments
This commit is contained in:
@@ -251,8 +251,6 @@ export class SASViyaApiClient {
|
||||
requestBody.environment = { autoExecLines }
|
||||
}
|
||||
|
||||
console.log('Body', requestBody)
|
||||
|
||||
const createContextRequest: RequestInit = {
|
||||
method: 'POST',
|
||||
headers,
|
||||
|
||||
14
src/SASjs.ts
14
src/SASjs.ts
@@ -107,6 +107,15 @@ export default class SASjs {
|
||||
return await this.sasViyaApiClient!.getExecutableContexts(accessToken)
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a compute context on the given server.
|
||||
* @param contextName - the name of the context to be created.
|
||||
* @param launchContextName - the name of the launcher context used by the compute service.
|
||||
* @param sharedAccountId - the ID of the account to run the servers for this context as.
|
||||
* @param autoExecLines - the lines of code to execute during session initialization.
|
||||
* @param authorizedUsers - an optional list of authorized user IDs.
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
*/
|
||||
public async createContext(
|
||||
contextName: string,
|
||||
launchContextName: string,
|
||||
@@ -128,6 +137,11 @@ export default class SASjs {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a compute context on the given server.
|
||||
* @param contextId - the ID of the context to be deleted.
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
*/
|
||||
public async deleteContext(contextId: string, accessToken?: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
|
||||
Reference in New Issue
Block a user