first commit

This commit is contained in:
janderluh
2026-06-08 16:50:39 +02:00
commit b8f1c1c760
19 changed files with 571 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
package com.frankenergie.smartasset.controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController
@RestController
class HealthController {
@GetMapping("/")
fun hello() = mapOf("message" to "smart-asset-test-Frank is running")
}

View File

@@ -0,0 +1,21 @@
package com.frankenergie.smartasset.controller
import com.frankenergie.smartasset.model.OrderUpdateRequest
import com.frankenergie.smartasset.model.OrderUpdateResponse
import com.frankenergie.smartasset.service.OrderBookService
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping("/api")
class OrderUpdateController(private val orderBookService: OrderBookService) {
@PostMapping("/orderupdate")
fun orderUpdate(@RequestBody request: OrderUpdateRequest): ResponseEntity<OrderUpdateResponse> {
val response = orderBookService.processOrder(request)
return ResponseEntity.ok(response)
}
}