0002393-endpoint-valorePasti #6

Merged
f.disciascio merged 1 commits from 0002393-endpoint-valorePasti into dev 2025-04-01 07:14:03 +00:00
Showing only changes of commit 8b4c9138ac - Show all commits

View File

@ -36,9 +36,13 @@ fun Route.valorePasti(valorePastiRepository: ValorePastiRepository){
// Cerca la tessera per codice fiscale
val valorePasto = valorePastiRepository.valorePastoByTessVassData(idTessera, idVassoio, data)
val prezzo = valorePasto.split("#").get(0)
val punti = valorePasto.split("#").get(1)
if(prezzo == "-1" && punti == "-1")
call.respondText("Prezzo e punti non trovati", status = HttpStatusCode.NotFound)
call.respond( ValorePasti(idTessera.toLong(),
idVassoio.toLong(), data,
prezzo.replace(',', '.').toDouble(),