For player routes, use characterId instead of playerId and for team routes, use (and, first, add) teamNumber for team routes instead of teamId.
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.
The TODO is here: https://github.com/JoeKennedy/fantasy/blob/master/Foundation.hs#L125
Two options here:
characterId
instead ofplayerId
and for team routes, use (and, first, add)teamNumber
for team routes instead ofteamId
.inAuthorized
for team and player routes, require that theteamId
andplayerId
, 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 usinggetBy404
rather thanget404
.