oneentry 1.0.167 → 1.0.169

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -109,9 +109,9 @@ export default class UsersApi extends AsyncModules {
109
109
  * @see {@link https://js-sdk.oneentry.cloud/docs/users/updateUser updateUser} documentation.
110
110
  */
111
111
  async updateUser(body, langCode = this.state.lang) {
112
- if (!('langCode' in body))
113
- body['langCode'] = langCode;
114
- const result = await this._fetchPut('/me', this._normalizePostBody(body, langCode));
112
+ // The language goes onto our own copy; the caller's body is left alone (CMS-909).
113
+ const payload = 'langCode' in body ? body : { ...body, langCode };
114
+ const result = await this._fetchPut('/me', this._normalizePostBody(payload, langCode));
115
115
  const validated = await this._validateResponse(result, schema('UpdateUserResponseSchema'));
116
116
  return validated;
117
117
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.167",
3
+ "version": "1.0.169",
4
4
  "description": "OneEntry NPM package",
5
5
  "main": "dist/index.js",
6
6
  "module": "esm/index.js",
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "scripts": {
50
50
  "prepublishOnly": "node ../scripts/smoke-pack.js --files-only",
51
- "postpublish": "node ../scripts/verify-published.js --named defineOneEntry --expect 1.0.167"
51
+ "postpublish": "node ../scripts/verify-published.js --named defineOneEntry --expect 1.0.169"
52
52
  },
53
53
  "sideEffects": false,
54
54
  "files": [