mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: get friends event
This commit is contained in:
parent
909e288bec
commit
d350aa950d
5 changed files with 44 additions and 9 deletions
|
@ -72,7 +72,7 @@ export class HydraApi {
|
|||
this.instance.interceptors.request.use(
|
||||
(request) => {
|
||||
logger.log(" ---- REQUEST -----");
|
||||
logger.log(request.method, request.url, request.data);
|
||||
logger.log(request.method, request.url, request.params, request.data);
|
||||
return request;
|
||||
},
|
||||
(error) => {
|
||||
|
@ -196,12 +196,12 @@ export class HydraApi {
|
|||
throw err;
|
||||
};
|
||||
|
||||
static async get(url: string) {
|
||||
static async get(url: string, params?: any) {
|
||||
if (!this.isLoggedIn()) throw new UserNotLoggedInError();
|
||||
|
||||
await this.revalidateAccessTokenIfExpired();
|
||||
return this.instance
|
||||
.get(url, this.getAxiosConfig())
|
||||
.get(url, { params, ...this.getAxiosConfig() })
|
||||
.then((response) => response.data)
|
||||
.catch(this.handleUnauthorizedError);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue