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

feat(update-context): Allow updating of a context by name

This commit is contained in:
Krishna Acondy
2020-09-11 13:00:56 +01:00
parent 0d3a381257
commit d17124f375
2 changed files with 50 additions and 22 deletions

View File

@@ -140,12 +140,12 @@ export default class SASjs {
/**
* Updates a compute context on the given server.
* @param contextId - the ID of the context to be deleted.
* @param contextName - the original name of the context to be deleted.
* @param editedContext - an object with the properties to be updated.
* @param accessToken - an access token for an authorized user.
*/
public async editContext(
contextId: string,
contextName: string,
editedContext: EditContextInput,
accessToken?: string
) {
@@ -153,7 +153,7 @@ export default class SASjs {
throw new Error('This operation is only supported on SAS Viya servers.')
}
return await this.sasViyaApiClient!.editContext(
contextId,
contextName,
editedContext,
accessToken
)