Removed prints.
This commit is contained in:
parent
ae161ba8aa
commit
828304fccb
@ -57,7 +57,6 @@ class Controller {
|
||||
|
||||
@PostMapping("/observation")
|
||||
fun addObservation(@Valid @RequestBody newObservation: NewObservation): Long? {
|
||||
println(newObservation)
|
||||
val site = siteRepository.findById(newObservation.site)
|
||||
val tutors = tutorRepository.findAllById(newObservation.tutors).toSet()
|
||||
if(!site.isPresent) return null
|
||||
@ -85,13 +84,11 @@ class Controller {
|
||||
it.observations.add(observation)
|
||||
tutorRepository.save(it)
|
||||
}
|
||||
println(observation)
|
||||
return observation.id
|
||||
}
|
||||
|
||||
@PostMapping("/observations")
|
||||
fun getObservations(@Valid @RequestBody observationsRequest: ObservationsRequest): List<Observation> {
|
||||
print(observationsRequest)
|
||||
if (observationsRequest.tutor != null) {
|
||||
return tutorRepository.findById(observationsRequest.tutor).map {
|
||||
when {
|
||||
|
Loading…
Reference in New Issue
Block a user