1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

adjust storage with payment intent/method handling

This commit is contained in:
Kyle Spearrin 2019-08-10 12:59:47 -04:00
parent e28e820286
commit de9bcac0ec
2 changed files with 7 additions and 5 deletions

View File

@ -122,7 +122,7 @@ export abstract class ApiService {
postPremium: (data: FormData) => Promise<PaymentResponse>;
postReinstatePremium: () => Promise<any>;
postCancelPremium: () => Promise<any>;
postAccountStorage: (request: StorageRequest) => Promise<any>;
postAccountStorage: (request: StorageRequest) => Promise<PaymentResponse>;
postAccountPayment: (request: PaymentRequest) => Promise<any>;
postAccountLicense: (data: FormData) => Promise<any>;
postAccountKey: (request: UpdateKeyRequest) => Promise<any>;

View File

@ -267,8 +267,9 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/accounts/cancel-premium', null, true, false);
}
postAccountStorage(request: StorageRequest): Promise<any> {
return this.send('POST', '/accounts/storage', request, true, false);
async postAccountStorage(request: StorageRequest): Promise<PaymentResponse> {
const r = await this.send('POST', '/accounts/storage', request, true, true);
return new PaymentResponse(r);
}
postAccountPayment(request: PaymentRequest): Promise<any> {
@ -791,8 +792,9 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/organizations/' + id + '/seat', request, true, false);
}
postOrganizationStorage(id: string, request: StorageRequest): Promise<any> {
return this.send('POST', '/organizations/' + id + '/storage', request, true, false);
async postOrganizationStorage(id: string, request: StorageRequest): Promise<PaymentResponse> {
const r = await this.send('POST', '/organizations/' + id + '/storage', request, true, true);
return new PaymentResponse(r);
}
postOrganizationPayment(id: string, request: PaymentRequest): Promise<any> {