feat: add admin dashboard backend and deployment workflow
All checks were successful
Deploy Blog Backend / test (push) Successful in 2m41s
Deploy Blog Backend / deploy (push) Successful in 1m29s

This commit is contained in:
wypark
2026-05-28 21:44:05 +09:00
parent 4c1bd8197f
commit c14d123fcc
25 changed files with 2271 additions and 11 deletions

View File

@@ -0,0 +1,26 @@
package me.wypark.blogbackend.api.controller.admin
import me.wypark.blogbackend.api.common.ApiResponse
import me.wypark.blogbackend.api.dto.AdminDashboardResponse
import me.wypark.blogbackend.domain.dashboard.AdminDashboardService
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping("/api/admin/dashboard")
class AdminDashboardController(
private val adminDashboardService: AdminDashboardService
) {
@GetMapping
fun getDashboard(
@RequestParam(required = false) range: String?,
@RequestParam(required = false) timezone: String?
): ResponseEntity<ApiResponse<AdminDashboardResponse>> {
val dashboard = adminDashboardService.getDashboard(range, timezone)
return ResponseEntity.ok(ApiResponse.success(dashboard, "OK"))
}
}