Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow assign business subscription seat #535

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/BusinessService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,12 @@ class BusinessService extends Base {
businessId,
businessSubscriptionId,
businessInvitationId,
username,
userId,
}: {
businessId: string;
businessSubscriptionId: string;
businessInvitationId: string;
username: string;
businessSubscriptionId?: string;
businessInvitationId?: string;
userId?: string;
}): Promise<UsedSeat> {
const { apiEndpointAddress, fetch } = this.lensPlatformClient;
const url = `${apiEndpointAddress}/businesses/${businessId}/subscription-seats`;
Expand All @@ -782,12 +782,12 @@ class BusinessService extends Base {
fetch.post(url, {
invitationId: businessInvitationId,
subscriptionId: businessSubscriptionId,
userId,
}),
{
404: (error) => new NotFoundException(error?.body.message),
400: (error) => new BadRequestException(error?.body.message),
403: () =>
new ForbiddenException(`Modification of user licenses for ${username} is forbidden`),
403: (error) => new ForbiddenException(error?.body.message),
422: (error) => new UnprocessableEntityException(error?.body.message),
},
);
Expand Down
Loading