Skip to content

Commit 1e6e8ac

Browse files
SIV-478 Status parameter moved to the body
1 parent 824981f commit 1e6e8ac

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/services/associations/service.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,12 @@ export default class AssociationsService {
7575
userId?: string,
7676
associationStatus?: AssociationStatus[]
7777
): Promise<Resource<Association | Errors>> {
78-
const queryParameters: QueryParameters = {};
79-
if (associationStatus && associationStatus.length > 0) {
80-
queryParameters.status = associationStatus;
81-
}
82-
const queryString = this.getQueryString(queryParameters);
83-
84-
const url = `/associations/companies/${companyNumber}/search${queryString}`;
78+
const url = `/associations/companies/${companyNumber}/search`;
8579

8680
const body: SearchForCompanyAssociationPostBody = {};
8781
if (userEmail) body.user_email = userEmail;
8882
if (userId) body.user_id = userId;
83+
if (associationStatus) body.status = associationStatus;
8984

9085
const response = await this.client.httpPost(url, body);
9186

src/services/associations/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,5 @@ export type AssociationsResponse = AssociationList | Association | NewAssociatio
212212
export interface SearchForCompanyAssociationPostBody {
213213
user_email?: string;
214214
user_id?: string;
215+
status?: AssociationStatus[]
215216
}

0 commit comments

Comments
 (0)