web: allow requesting refunds from settings

This commit is contained in:
Abdullah Atta
2023-05-01 12:55:33 +05:00
committed by Abdullah Atta
parent a0229729b7
commit 7f873f240e
2 changed files with 44 additions and 0 deletions

View File

@@ -34,6 +34,16 @@ export default class Subscriptions {
await http.delete(`${hosts.SUBSCRIPTIONS_HOST}/subscriptions`, token);
}
async refund() {
const token = await this._tokenManager.getAccessToken();
if (!token) return;
await http.post(
`${hosts.SUBSCRIPTIONS_HOST}/subscriptions/refund`,
null,
token
);
}
async updateUrl() {
const token = await this._tokenManager.getAccessToken();
if (!token) return;