clean up
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
package space.luminic.budgerapp.controllers
|
||||
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.http.HttpStatus
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.web.bind.annotation.DeleteMapping
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.PathVariable
|
||||
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.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
@@ -18,11 +16,7 @@ import space.luminic.budgerapp.models.Budget
|
||||
import space.luminic.budgerapp.models.BudgetDTO
|
||||
import space.luminic.budgerapp.models.Transaction
|
||||
import space.luminic.budgerapp.models.Warn
|
||||
|
||||
import space.luminic.budgerapp.services.BudgetService
|
||||
import space.luminic.budgerapp.services.CacheInspector
|
||||
import java.math.BigDecimal
|
||||
import java.sql.Date
|
||||
import java.time.LocalDate
|
||||
|
||||
|
||||
@@ -41,7 +35,7 @@ class BudgetController(
|
||||
|
||||
@GetMapping("/{id}")
|
||||
fun getBudget(@PathVariable id: String): Mono<BudgetDTO> {
|
||||
// logger.info(cacheInspector.getCacheContent("budgets").toString())
|
||||
|
||||
return budgetService.getBudget(id)
|
||||
}
|
||||
|
||||
@@ -88,11 +82,7 @@ class BudgetController(
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/recalc-categories")
|
||||
fun recalcCategories(): Mono<Void> {
|
||||
return budgetService.recalcBudgetCategory()
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/{id}/warns")
|
||||
fun budgetWarns(@PathVariable id: String, @RequestParam hidden: Boolean? = null): Mono<List<Warn>> {
|
||||
@@ -101,7 +91,7 @@ class BudgetController(
|
||||
|
||||
@PostMapping("/{id}/warns/{warnId}/hide")
|
||||
fun setWarnHide(@PathVariable id: String, @PathVariable warnId: String): Mono<Warn> {
|
||||
return budgetService.hideWarn(id, warnId)
|
||||
return budgetService.hideWarn( warnId)
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user