1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-24 16:49:26 +01:00

api for leaving organization

This commit is contained in:
Kyle Spearrin 2018-07-04 09:54:14 -04:00
parent 236c00475d
commit 278b4402da
3 changed files with 6 additions and 1 deletions

View File

@ -119,5 +119,6 @@ export abstract class ApiService {
postTwoFactorEmailSetup: (request: TwoFactorEmailRequest) => Promise<any>;
postTwoFactorEmail: (request: TwoFactorEmailRequest) => Promise<any>;
postOrganization: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;
postLeaveOrganization: (id: string) => Promise<any>;
postOrganizationLicense: (data: FormData) => Promise<OrganizationResponse>;
}

View File

@ -37,7 +37,7 @@ export class CiphersComponent {
await this.load(this.filter);
}
async applyFilter(filter: (cipher: CipherView) => boolean = null) {
applyFilter(filter: (cipher: CipherView) => boolean = null) {
this.filter = filter;
if (this.filter == null) {
this.ciphers = this.allCiphers;

View File

@ -429,6 +429,10 @@ export class ApiService implements ApiServiceAbstraction {
return new OrganizationResponse(r);
}
postLeaveOrganization(id: string): Promise<any> {
return this.send('POST', '/organizations/' + id + '/leave', null, true, false);
}
async postOrganizationLicense(data: FormData): Promise<OrganizationResponse> {
const r = await this.send('POST', '/organizations/license', data, true, true);
return new OrganizationResponse(r);