web: fix "Unauthorized" error on subscription cancel

This commit is contained in:
Abdullah Atta
2023-04-26 11:37:56 +05:00
committed by Abdullah Atta
parent 2ba638b123
commit 21c8960146

View File

@@ -29,13 +29,13 @@ export default class Subscriptions {
}
async cancel() {
const token = this._tokenManager.getAccessToken();
const token = await this._tokenManager.getAccessToken();
if (!token) return;
await http.delete(`${hosts.SUBSCRIPTIONS_HOST}/subscriptions`, token);
}
async updateUrl() {
const token = this._tokenManager.getAccessToken();
const token = await this._tokenManager.getAccessToken();
if (!token) return;
return await http.get(
`${hosts.SUBSCRIPTIONS_HOST}/subscriptions/update_url`,