Removed prints.

This commit is contained in:
neviyn 2018-10-09 09:47:19 +01:00
parent ae161ba8aa
commit 828304fccb

View File

@ -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 {