added statistics for create and found posts

This commit is contained in:
SlimusMinus
2026-07-30 00:18:05 +03:00
parent 1981eb54a4
commit bea9696a28
7 changed files with 127 additions and 4 deletions

View File

@@ -0,0 +1,20 @@
package com.krylov.refound.controller;
import com.krylov.refound.entity.Statistics;
import com.krylov.refound.service.StatisticsService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/statistics")
public class StatisticsController {
private final StatisticsService statisticsService;
@GetMapping
public Statistics get() {
return statisticsService.getStatistics();
}
}