Added controllers description
This commit is contained in:
@ -19,17 +19,22 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
|
||||
@RequestMapping("/api/" + App.API_VERSION + "/groups")
|
||||
@Api(tags = {
|
||||
"Group" }, value = "Group", description = "Enpoints to deal with gorups. Group is related directly to course and can be either class and lecture")
|
||||
public class GroupController {
|
||||
@Autowired
|
||||
private GroupService groupService;
|
||||
|
||||
@GetMapping("/course/{id}")
|
||||
|
||||
public ResponseEntity<GetCourseGroupsResponse<? extends DefaultGroupResponse>> getCourses(@PathVariable(name = "id") Long id,
|
||||
|
||||
public ResponseEntity<GetCourseGroupsResponse<? extends DefaultGroupResponse>> getCourses(
|
||||
@PathVariable(name = "id") Long id,
|
||||
@RequestParam(name = "capacity", defaultValue = "true") Boolean capacity) {
|
||||
List<Groups> groups = this.groupService.getGroupsByCourse(id);
|
||||
if (capacity) {
|
||||
|
Reference in New Issue
Block a user