27 lines
751 B
Java
27 lines
751 B
Java
|
|
package com.gcsc.guide.controller;
|
||
|
|
|
||
|
|
import com.gcsc.guide.dto.StatsResponse;
|
||
|
|
import com.gcsc.guide.service.UserService;
|
||
|
|
import lombok.RequiredArgsConstructor;
|
||
|
|
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.RestController;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 관리자 통계 API
|
||
|
|
*/
|
||
|
|
@RestController
|
||
|
|
@RequestMapping("/api/admin/stats")
|
||
|
|
@RequiredArgsConstructor
|
||
|
|
public class AdminStatsController {
|
||
|
|
|
||
|
|
private final UserService userService;
|
||
|
|
|
||
|
|
/** 전체 통계 조회 */
|
||
|
|
@GetMapping
|
||
|
|
public ResponseEntity<StatsResponse> getStats() {
|
||
|
|
return ResponseEntity.ok(userService.getStats());
|
||
|
|
}
|
||
|
|
}
|