Commit 82ea409c authored by Grzegorz Pietrusza's avatar Grzegorz Pietrusza

team solutions endpoint improved

parent 49cd7aab
......@@ -27,8 +27,9 @@ public class SolutionsRepository implements Repository
//todo: do not add if already exists
}
public void getByTeam(Team team)
public List<Solution> getByTeam(Team team)
{
//todo: merge with upper
return datastore.createQuery(Solution.class).filter("team", team).asList();
}
}
\ No newline at end of file
......@@ -52,10 +52,10 @@ public class SolutionsResource
@GET
@Path("/my")
public void getTeamSolutions(@Auth User user)
public List<Solution> getTeamSolutions(@Auth User user)
{
Optional<Team> team = teamsRepository.getTeamByUser(user);
solutionsRepository.getByTeam(team.get())
return solutionsRepository.getByTeam(team.get()); //todo: per task
}
@GET
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment