@sprucelabs/spruce-profile-utils 3.0.16 → 3.0.17

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.
@@ -66,7 +66,7 @@ class ProfileCardViewController extends AbstractViewController {
66
66
  try {
67
67
  const client = yield this.connectToApi();
68
68
  const values = this.formVc.getValues();
69
- yield client.emitAndFlattenResponses('update-person::v2020_12_25', {
69
+ const [{ person: updatedPerson }] = yield client.emitAndFlattenResponses('update-person::v2020_12_25', {
70
70
  target: {
71
71
  personId: (_a = this.person) === null || _a === void 0 ? void 0 : _a.id,
72
72
  organizationId: this.organizationId,
@@ -75,7 +75,6 @@ class ProfileCardViewController extends AbstractViewController {
75
75
  payload: Object.assign({}, values),
76
76
  });
77
77
  const loggedInPerson = this.authenticator.getPerson();
78
- const updatedPerson = Object.assign(Object.assign({}, this.person), values);
79
78
  const isMe = loggedInPerson.id === ((_b = this.person) === null || _b === void 0 ? void 0 : _b.id);
80
79
  if (isMe) {
81
80
  const token = this.authenticator.getSessionToken();
@@ -58,7 +58,7 @@ class ProfileCardViewController extends heartwood_view_controllers_1.AbstractVie
58
58
  try {
59
59
  const client = await this.connectToApi();
60
60
  const values = this.formVc.getValues();
61
- await client.emitAndFlattenResponses('update-person::v2020_12_25', {
61
+ const [{ person: updatedPerson }] = await client.emitAndFlattenResponses('update-person::v2020_12_25', {
62
62
  target: {
63
63
  personId: (_a = this.person) === null || _a === void 0 ? void 0 : _a.id,
64
64
  organizationId: this.organizationId,
@@ -67,7 +67,6 @@ class ProfileCardViewController extends heartwood_view_controllers_1.AbstractVie
67
67
  payload: Object.assign({}, values),
68
68
  });
69
69
  const loggedInPerson = this.authenticator.getPerson();
70
- const updatedPerson = Object.assign(Object.assign({}, this.person), values);
71
70
  const isMe = loggedInPerson.id === ((_b = this.person) === null || _b === void 0 ? void 0 : _b.id);
72
71
  if (isMe) {
73
72
  const token = this.authenticator.getSessionToken();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-profile-utils",
3
3
  "description": "Useeful utilities",
4
- "version": "3.0.16",
4
+ "version": "3.0.17",
5
5
  "skill": {
6
6
  "namespace": "profile"
7
7
  },