endpointsd refactore

This commit is contained in:
Filip Izydorczyk
2020-12-10 16:34:42 +01:00
parent 7c457ce232
commit dfe534a835
2 changed files with 38 additions and 1 deletions

View File

@ -29,7 +29,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
@CrossOrigin
@RequestMapping("/api/" + App.API_VERSION + "/assignments")
@Api(tags = {
"Assignments" }, value = "Assignments", description = "Assignment is representation of student willing to join given group (lecture or calss)")
"Assignments" }, value = "Assignments", description = "Assignment is representation of student willing to join given group (lecture or calss). This comtroller is depreaceted. Use commission instead")
@Deprecated
public class AssignmentsController extends TokenBasedController {
@Autowired
@ -40,6 +41,7 @@ public class AssignmentsController extends TokenBasedController {
@GetMapping("/user")
@ApiOperation(value = "Return user current assignemts (from newest commision). STUDENT Token needs to be provided.")
@Deprecated
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignments() throws Exception {
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException("User not found"));
Optional<Commision> com = this.commisionService.getNewestCommision(user);