TheLoons / SportIM-service

Backend Webservice for SportIM
GNU General Public License v2.0
1 stars 0 forks source link

Not able to PUT with leagues, always returns 'Invalid Team Id' #44

Closed boccobrock closed 9 years ago

boccobrock commented 9 years ago

Using League id 21, I am unable to save changes to the league.

hjbrock commented 9 years ago

Could you put the JSON you're trying to PUT here?

hjbrock commented 9 years ago

Actually, I probably know what's happening looking at code. You're putting to:

/rest/league/{id}

Right? Looks like that was co-opted for adding a team to a league so you can't use it for generic league changes. Put to:

/rest/league

And just make sure the league ID is in the JSON. We can change this, but Doug should do it as it's a rewrite of his code.

hjbrock commented 9 years ago

Alright, you can use the old URLs for typical team/league PUTs again:

/rest/league/{leagueID} /rest/team/{teamID}

I've moved the player-to-team addition to:

/rest/team/{teamID}/add?login=

And the team-to-league addition to:

/rest/league/{leagueID}/add?teamId=