mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: refactor hydra api
This commit is contained in:
parent
a81b016500
commit
6f70b529a2
9 changed files with 27 additions and 43 deletions
|
@ -10,8 +10,7 @@ const getUser = async (
|
|||
userId: string
|
||||
): Promise<UserProfile | null> => {
|
||||
try {
|
||||
const response = await HydraApi.get(`/user/${userId}`);
|
||||
const profile = response.data;
|
||||
const profile = await HydraApi.get(`/user/${userId}`);
|
||||
|
||||
const recentGames = await Promise.all(
|
||||
profile.recentGames.map(async (game) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue