1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-31 07:33:23 +00:00

Add sponsorship pre validate endpoint (#564)

This commit is contained in:
Matt Gibson
2021-11-24 14:19:03 -06:00
committed by GitHub
parent 340a79bfe6
commit d02fcd082e
2 changed files with 8 additions and 0 deletions

View File

@@ -1579,6 +1579,13 @@ export class ApiService implements ApiServiceAbstraction {
'/organization/sponsorship/sponsored/' + sponsoringOrgId,
null, true, false);
}
async postPreValidateSponsorshipToken(sponsorshipToken: string): Promise<boolean> {
const r = await this.send('POST', '/organization/sponsorship/validate-token?sponsorshipToken=' + encodeURIComponent(sponsorshipToken),
null, true, true);
return r as boolean;
}
async postRedeemSponsorship(sponsorshipToken: string, request: OrganizationSponsorshipRedeemRequest): Promise<void> {
return await this.send('POST', '/organization/sponsorship/redeem?sponsorshipToken=' + encodeURIComponent(sponsorshipToken),
request, true, false);