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

Make team and player URLs unique within league #1

Closed
JoeKennedy opened this issue Apr 27, 2016 · 1 comment
Closed

Make team and player URLs unique within league #1

JoeKennedy opened this issue Apr 27, 2016 · 1 comment
Assignees

Comments

@JoeKennedy
Copy link
Owner

The TODO is here: https://github.com/JoeKennedy/fantasy/blob/master/Foundation.hs#L125

Two options here:

  1. For player routes, use characterId instead of playerId and for team routes, use (and, first, add) teamNumber for team routes instead of teamId.
  2. In inAuthorized for team and player routes, require that the teamId and playerId, respectively, are in the league.

I'd prefer the first option, because it'll shorten the urls for each, so it'll produce /leagues/50/players/110 instead of /leagues/50/players/2345. However, you'll have to change all the routes to take the new parameter, and lookup the relevant entities using getBy404 rather than get404.

@JoeKennedy
Copy link
Owner Author

As a note, I'm going with the first option discussed in my opening comment.

JoeKennedy added a commit that referenced this issue Jul 10, 2016
Make team and player urls unique within league.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant