1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-12 22:50:06 +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>(