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

Favorite songs (Chunithm) #49

Open
wants to merge 3 commits into
base: v1-dev
Choose a base branch
from
Open

Conversation

alexay7
Copy link
Contributor

@alexay7 alexay7 commented Jul 30, 2024

Fixes #48

Adds a section at the bottom of the user profile with a list of the favorite songs of the user. Also provides a song selector with pagination that grabs the songs info and metadata from the all_music.json.

Gets the user's favorite songs by including this info in the /user-summary endpoint, obtained from the general data table.

@@ -262,7 +265,7 @@ export const USER = {
}

export const USERBOX = {
getAimeId:(cardId:string):Promise<{luid:string}|null> =>realPost('/api/sega/aime/getByAccessCode',{ accessCode:cardId }),
toggleFavSong:(aimeId:string, songId:number) =>put(`/api/game/chuni/v2/song/${songId}/favorite?aimeId=${aimeId}`,{}, { params:{ aimeId } }),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can use token to identify user in the backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to add and remove favorite songs (chunithm)
2 participants