Skip to content

Commit 27e952e

Browse files
authored
Merge pull request Expensify#82938 from rayane-d/fix-missing-domainID-parameter
[Domain control] Add domainAccountID parameter to DeleteDomainMember
2 parents 37dbdd1 + 18b8555 commit 27e952e

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/libs/API/parameters/DeleteDomainMemberParams.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
type DeleteDomainMemberParams = {
22
targetEmail: string;
33
domain: string;
4+
domainAccountID: number;
45
overrideProcessingReports: boolean;
56
};
67

src/libs/actions/Domain.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,7 @@ function closeUserAccount(domainAccountID: number, domain: string, targetEmail:
10711071

10721072
const parameters: DeleteDomainMemberParams = {
10731073
domain,
1074+
domainAccountID,
10741075
targetEmail,
10751076
overrideProcessingReports,
10761077
};

tests/actions/DomainTest.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ describe('actions/Domain', () => {
327327

328328
expect(apiWriteSpy).toHaveBeenCalledWith(
329329
WRITE_COMMANDS.DELETE_DOMAIN_MEMBER,
330-
{domain: domainName, targetEmail, overrideProcessingReports: false},
330+
{domain: domainName, domainAccountID, targetEmail, overrideProcessingReports: false},
331331
{
332332
optimisticData: expect.arrayContaining([
333333
expect.objectContaining({
@@ -379,7 +379,11 @@ describe('actions/Domain', () => {
379379

380380
closeUserAccount(domainAccountID, domainName, targetEmail, undefined, true);
381381

382-
expect(apiWriteSpy).toHaveBeenCalledWith(WRITE_COMMANDS.DELETE_DOMAIN_MEMBER, {domain: domainName, targetEmail, overrideProcessingReports: true}, expect.any(Object));
382+
expect(apiWriteSpy).toHaveBeenCalledWith(
383+
WRITE_COMMANDS.DELETE_DOMAIN_MEMBER,
384+
{domain: domainName, targetEmail, overrideProcessingReports: true, domainAccountID},
385+
expect.any(Object),
386+
);
383387

384388
apiWriteSpy.mockRestore();
385389
});

0 commit comments

Comments
 (0)