removed unneeded variable
This commit is contained in:
@@ -58,8 +58,8 @@ fun Application.configureCollectionItemRoutes(dbConnection: Connection) {
|
|||||||
try {
|
try {
|
||||||
val inputItem = call.receive<CollectionItem>()
|
val inputItem = call.receive<CollectionItem>()
|
||||||
itemService.readById(inputItem.id)
|
itemService.readById(inputItem.id)
|
||||||
val result = itemService.update(inputItem)
|
itemService.update(inputItem)
|
||||||
call.respondText("Updated ${inputItem.title} to database: $result", status=HttpStatusCode.OK)
|
call.respondText("Updated ${inputItem.title} to database.", status=HttpStatusCode.OK)
|
||||||
} catch (cause: DbElementNotFoundException) {
|
} catch (cause: DbElementNotFoundException) {
|
||||||
log.error(cause.message)
|
log.error(cause.message)
|
||||||
call.respond(HttpStatusCode.NotFound, cause.message ?: "Could not find item in database.")
|
call.respond(HttpStatusCode.NotFound, cause.message ?: "Could not find item in database.")
|
||||||
|
|||||||
Reference in New Issue
Block a user