1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

billing updates

This commit is contained in:
Kyle Spearrin
2018-07-17 22:49:53 -04:00
parent 4557366154
commit 9a23d5fa97
5 changed files with 20 additions and 9 deletions

View File

@@ -16,7 +16,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service';
templateUrl: 'update-license.component.html',
})
export class UpdateLicenseComponent {
@Input() user = true;
@Input() organizationId: string;
@Output() onUpdated = new EventEmitter();
@Output() onCanceled = new EventEmitter();
@@ -38,10 +38,10 @@ export class UpdateLicenseComponent {
const fd = new FormData();
fd.append('license', files[0]);
if (this.user) {
if (this.organizationId == null) {
this.formPromise = this.apiService.postAccountLicense(fd);
} else {
// TODO
this.formPromise = this.apiService.postOrganizationLicenseUpdate(this.organizationId, fd);
}
await this.formPromise;