hot fix child transactiopns

This commit is contained in:
xds
2025-03-10 13:24:32 +03:00
parent 94df5d72c3
commit ed8965b055
2 changed files with 23 additions and 19 deletions

View File

@@ -3,6 +3,7 @@ package space.luminic.budgerapp.controllers
import kotlinx.coroutines.reactor.awaitSingle
import kotlinx.coroutines.reactor.awaitSingleOrNull
import org.bson.Document
import org.slf4j.LoggerFactory
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.*
@@ -24,6 +25,8 @@ class SpaceController(
private val recurrentService: RecurrentService
) {
private val log = LoggerFactory.getLogger(SpaceController::class.java)
data class SpaceCreateDTO(
val name: String,
@@ -94,6 +97,7 @@ class SpaceController(
@GetMapping("/{spaceId}/budgets/{id}")
suspend fun getBudget(@PathVariable spaceId: String, @PathVariable id: String): BudgetDTO? {
log.info("Getting budget for spaceId=$spaceId, id=$id")
spaceService.isValidRequest(spaceId)
return financialService.getBudget(spaceId, id)
}