1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-25 16:59:17 +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>; postTwoFactorEmailSetup: (request: TwoFactorEmailRequest) => Promise<any>;
postTwoFactorEmail: (request: TwoFactorEmailRequest) => Promise<any>; postTwoFactorEmail: (request: TwoFactorEmailRequest) => Promise<any>;
postOrganization: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>; postOrganization: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;
postLeaveOrganization: (id: string) => Promise<any>;
postOrganizationLicense: (data: FormData) => Promise<OrganizationResponse>; postOrganizationLicense: (data: FormData) => Promise<OrganizationResponse>;
} }

View File

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

View File

@ -429,6 +429,10 @@ export class ApiService implements ApiServiceAbstraction {
return new OrganizationResponse(r); 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> { async postOrganizationLicense(data: FormData): Promise<OrganizationResponse> {
const r = await this.send('POST', '/organizations/license', data, true, true); const r = await this.send('POST', '/organizations/license', data, true, true);
return new OrganizationResponse(r); return new OrganizationResponse(r);