Part 2 has been ended. The Part 3: chanaged test

This commit is contained in:
2020-11-08 17:20:00 +01:00
parent a30c3af09c
commit 035de011f2
16 changed files with 82 additions and 82 deletions

View File

@ -16,7 +16,7 @@ import com.plannaplan.entities.Assignment;
import com.plannaplan.entities.Commision;
import com.plannaplan.entities.User;
import com.plannaplan.responses.mappers.AssignmentResponseMappers;
import com.plannaplan.responses.models.GetCurrentAssignmentsResponse;
import com.plannaplan.responses.models.AssignmentResponse;
import com.plannaplan.services.AssignmentService;
import com.plannaplan.services.CommisionService;
@ -40,7 +40,7 @@ public class AssignmentsController extends TokenBasedController {
@GetMapping("/user")
@ApiOperation(value = "Return user current assignemts (from newest commision). STUDENT Token needs to be provided.")
public ResponseEntity<List<GetCurrentAssignmentsResponse>> getCurrentAssignments() throws Exception {
public ResponseEntity<List<AssignmentResponse>> getCurrentAssignments() throws Exception {
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException("User not found"));
Optional<Commision> com = this.commisionService.getNewestCommision(user);