diff --git a/web/satellite/src/api/projects.ts b/web/satellite/src/api/projects.ts index f92f88c68..c3ce926a4 100644 --- a/web/satellite/src/api/projects.ts +++ b/web/satellite/src/api/projects.ts @@ -3,6 +3,7 @@ import { DataStamp, + LimitRequestInfo, Project, ProjectFields, ProjectInvitation, @@ -149,6 +150,28 @@ export class ProjectsHttpApi implements ProjectsApi { } + /** + * Request limit increase. + * + * @param projectId - project ID + * @param info - request information + * @throws Error + */ + public async requestLimitIncrease(projectId: string, info: LimitRequestInfo): Promise { + const path = `${this.ROOT_PATH}/${projectId}/limit-increase`; + const response = await this.http.post(path, JSON.stringify(info)); + if (response.ok) { + return; + } + + const result = await response.json(); + throw new APIError({ + status: response.status, + message: result.error || 'Can not request increase', + requestID: response.headers.get('x-request-id'), + }); + } + /** * Get total limits for all the projects that user owns. * diff --git a/web/satellite/src/components/modals/ChangeProjectLimitModal.vue b/web/satellite/src/components/modals/ChangeProjectLimitModal.vue index c2f92b35e..b582ebc7e 100644 --- a/web/satellite/src/components/modals/ChangeProjectLimitModal.vue +++ b/web/satellite/src/components/modals/ChangeProjectLimitModal.vue @@ -76,14 +76,13 @@