Skip to content

Commit

Permalink
Wrap specialties and professions in objects before JSON.stringify in…
Browse files Browse the repository at this point in the history
… metaobject functions
  • Loading branch information
jamalsoueidan committed May 31, 2024
1 parent 8665c14 commit 073f7b3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ describe("CustomerCreateOrchestration", () => {
},
{
key: "specialties",
value: JSON.stringify(userData.specialties),
value: JSON.stringify({ specialties: userData.specialties || [] }),
},
{
key: "professions",
value: JSON.stringify(userData.professions || []),
value: JSON.stringify({ professions: userData.professions || [] }),
},
{
key: "collection",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ export const createUserMetaobject = async ({
},
{
key: "specialties",
value: JSON.stringify(user.specialties || []),
value: JSON.stringify({ specialties: user.specialties || [] }),
},
{
key: "professions",
value: JSON.stringify(user.professions || []),
value: JSON.stringify({ professions: user.professions || [] }),
},
{
key: "collection",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ describe("CustomerUpdateOrchestration", () => {
},
{
key: "specialties",
value: JSON.stringify(user.specialties || []),
value: JSON.stringify({ specialties: user.specialties || [] }),
},
{
key: "professions",
value: JSON.stringify(user.professions || []),
value: JSON.stringify({ professions: user.professions || [] }),
},
{
key: "social",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ export const updateUserMetaobject = async ({
},
{
key: "specialties",
value: JSON.stringify(user.specialties || []),
value: JSON.stringify({ specialties: user.specialties || [] }),
},
{
key: "professions",
value: JSON.stringify(user.professions || []),
value: JSON.stringify({ professions: user.professions || [] }),
},
{
key: "social",
Expand Down

0 comments on commit 073f7b3

Please sign in to comment.