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

Add full card objects to deck API responses. #70

Open
severinkaderli opened this issue Jul 12, 2021 · 1 comment
Open

Add full card objects to deck API responses. #70

severinkaderli opened this issue Jul 12, 2021 · 1 comment

Comments

@severinkaderli
Copy link
Contributor

Currently when you query for a deck through the API you just get a list of UIDs in the deck.cards property. That means for displaying names and other information in the deck builder I first need to convert the UIDs to proper card objects. It would be convenient if deck responses would contain the full card objects.

@sindreslungaard
Copy link
Owner

I think it makes more sense for the client to deal with this than the server, as the client already has all this data stored.

I believe all the card info is just stored in an array on the client side now, so maybe to make it more efficient it should be converted/copied to a map once loaded and then in the template you can just do something like cardMap[uid].Name?

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

No branches or pull requests

2 participants