1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-16 08:30:07 +00:00

feat(delete-context): add the ability to delete a compute context

This commit is contained in:
Krishna Acondy
2020-09-08 18:29:12 +01:00
parent c9c9754916
commit 58d69a62d6

View File

@@ -128,11 +128,11 @@ export default class SASjs {
) )
} }
public async deleteContext(contextId: string) { public async deleteContext(contextId: string, accessToken?: string) {
if (this.sasjsConfig.serverType !== ServerType.SASViya) { if (this.sasjsConfig.serverType !== ServerType.SASViya) {
throw new Error('This operation is only supported on SAS Viya servers.') throw new Error('This operation is only supported on SAS Viya servers.')
} }
return await this.sasViyaApiClient!.deleteContext(contextId) return await this.sasViyaApiClient!.deleteContext(contextId, accessToken)
} }
public async createSession(contextName: string, accessToken: string) { public async createSession(contextName: string, accessToken: string) {