Added empty table
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
bd4591f442
commit
48fdeb726f
@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@ -38,7 +39,7 @@ public class AssignmentsController extends TokenBasedController {
|
||||
private AssignmentService assignmentService;
|
||||
|
||||
@GetMapping("/user")
|
||||
@ApiOperation(value = "Retrun user current assignemts (from newest commision). STUDENT Token needs to be provided.")
|
||||
@ApiOperation(value = "Return user current assignemts (from newest commision). STUDENT Token needs to be provided.")
|
||||
public ResponseEntity<List<GetCurrentAssignmentsResponse>> getCurrentAssignments() throws Exception {
|
||||
User user = this.getCurrentUser().orElseThrow(() -> new NullPointerException("User not found"));
|
||||
Optional<Commision> com = this.commisionService.getNewestCommision(user);
|
||||
@ -48,6 +49,6 @@ public class AssignmentsController extends TokenBasedController {
|
||||
return new ResponseEntity<>(AssignmentResponseMappers.mapToResponse(respone), HttpStatus.OK);
|
||||
}
|
||||
|
||||
return new ResponseEntity<>(null, HttpStatus.OK);
|
||||
return new ResponseEntity<>(new ArrayList<>(), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user