find Real customer api (inconvinence)

This commit is contained in:
ZalanBoss
2020-05-16 10:50:42 +02:00
parent 5a4dda676b
commit 565680636a
5 changed files with 22 additions and 3 deletions
@@ -23,7 +23,13 @@ class CustomerController ( private val customerRepository: CustomerRepository )
return customerRepository.findById(customerId).map { customer ->
ResponseEntity.ok(customer)
}.orElse(ResponseEntity.notFound().build())
}
}
@GetMapping("/customers/real")
fun getRealCustomers(active: String): List<Customer> =
customerRepository.findRealCustomers(active)
@PutMapping("/customers/{id}")
fun updateCustomerById(@PathVariable(value = "id") customerId: Long,