1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

feat(create-context): add the ability to modify attributes

This commit is contained in:
Krishna Acondy
2020-09-10 10:02:55 +01:00
parent f69a635e1d
commit b2f6d4e6d1
2 changed files with 7 additions and 1 deletions

View File

@@ -323,7 +323,11 @@ export class SASViyaApiClient {
const updateContextRequest: RequestInit = {
method: 'PUT',
headers,
body: JSON.stringify({ ...context, ...updatedContext })
body: JSON.stringify({
...context,
...updatedContext,
attributes: { ...context.attributes, ...updatedContext.attributes }
})
}
return await this.request<Context>(

View File

@@ -3,6 +3,7 @@ export interface Context {
id: string
createdBy: string
version: number
attributes?: any
}
export interface EditContextInput {
@@ -10,6 +11,7 @@ export interface EditContextInput {
description?: string
launchContext?: { name: string }
environment?: { options?: string[]; autoExecLines?: string[] }
attributes?: any
authorizedUsers?: string[]
authorizeAllAuthenticatedUsers?: boolean
}