Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User leaderboard return data has irrelevant data #173

Open
Fursum opened this issue Aug 6, 2023 · 0 comments
Open

User leaderboard return data has irrelevant data #173

Fursum opened this issue Aug 6, 2023 · 0 comments
Assignees
Labels
Package-API Related to exposed backend

Comments

@Fursum
Copy link
Collaborator

Fursum commented Aug 6, 2023

Currently, we use the user id to generate their cards. Those ids are fetching their user data individually.
The current return is this:

type LeaderboardResponse = {
  id: number;
  user_name: string;
  profile_picture: string;
  ranked_map_count: number;
  influence_count?: number;
};

We only need the id and probably influence count. We could access the influence count from the user data so it is not mandatory. Would be nice to have though.
An alternative is to have all of the base user data to immediately render the users.

Proposed return type:

type LeaderboardResponse = {
  id: number;
  influence_count: number;
};
@Fursum Fursum added the Package-API Related to exposed backend label Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package-API Related to exposed backend
Projects
None yet
Development

No branches or pull requests

2 participants