Skip to content

Commit

Permalink
🎨 Add identification wrapper around users
Browse files Browse the repository at this point in the history
  • Loading branch information
ManuDeBuck committed Aug 29, 2021
1 parent c94dbeb commit 53860b4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
14 changes: 10 additions & 4 deletions lib/Client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,10 @@ describe("Client", () => {
}),
JSON.stringify({
account: { accountId: "aId" },
users: [{ userId: "uId" }, { email: "[email protected]" }],
users: [
{ identification: { userId: "uId" } },
{ identification: { email: "[email protected]" } },
],
})
);

Expand Down Expand Up @@ -767,7 +770,10 @@ describe("Client", () => {
}),
JSON.stringify({
account: { accountId: "aId" },
users: [{ userId: "uId" }, { email: "[email protected]" }],
users: [
{ identification: { userId: "uId" } },
{ identification: { email: "[email protected]" } },
],
})
);

Expand Down Expand Up @@ -821,7 +827,7 @@ describe("Client", () => {
}),
JSON.stringify({
account: { accountId: "aId" },
users: [{ userId: "uId" }],
users: [{ identification: { userId: "uId" } }],
})
);

Expand Down Expand Up @@ -849,7 +855,7 @@ describe("Client", () => {
}),
JSON.stringify({
account: { accountId: "aId" },
users: [{ userId: "uId" }],
users: [{ identification: { userId: "uId" } }],
})
);

Expand Down
8 changes: 6 additions & 2 deletions lib/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ export class Client {
}),
JSON.stringify({
account: this.getAccountIdentification(args.account),
users: args.users.map((user) => this.getUserIdentification(user)),
users: args.users.map((user) => {
return { identification: this.getUserIdentification(user) };
}),
})
);

Expand Down Expand Up @@ -340,7 +342,9 @@ export class Client {
}),
JSON.stringify({
account: this.getAccountIdentification(args.account),
users: args.users.map((user) => this.getUserIdentification(user)),
users: args.users.map((user) => {
return { identification: this.getUserIdentification(user) };
}),
})
);

Expand Down

0 comments on commit 53860b4

Please sign in to comment.