handle prefixes

This commit is contained in:
gowthaman
2024-04-30 12:21:57 +05:30
parent fb4f1a0995
commit f2b05b229d
4 changed files with 44 additions and 8 deletions

View File

@@ -810,6 +810,14 @@ object IncomingInventoryCtrl {
Session.currentUserPlants()
)
}
fun updatePlant(ctx: Context) {
val p = ctx.bodyAsClass<Plant>()
val plant = database.find(Plant::class.java, ctx.pathParam("id"))
plant.patch(p)
ctx.json(
Session.currentUserPlants()
)
}
fun create(ctx: Context) {
val ticket = ctx.bodyAsClass<IncomingInventory>()