2019-02-16 11:04:41 +01:00
|
|
|
package eu.dnetlib.repo.manager.controllers;
|
|
|
|
|
|
|
|
import eu.dnetlib.repo.manager.service.StatsServiceImpl;
|
2023-06-01 19:48:01 +02:00
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
2019-02-16 11:04:41 +01:00
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
@RequestMapping(value = "/stats")
|
2023-06-01 19:48:01 +02:00
|
|
|
@Tag(name="statistics", description = "Stats API")
|
2019-02-16 11:04:41 +01:00
|
|
|
public class StatsController {
|
|
|
|
|
|
|
|
@Autowired
|
2019-07-22 15:00:51 +02:00
|
|
|
private StatsServiceImpl statsService;
|
2019-02-16 11:04:41 +01:00
|
|
|
|
2022-12-07 12:37:55 +01:00
|
|
|
@RequestMapping(value = "/getStatistics" , method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
2019-02-16 11:04:41 +01:00
|
|
|
@ResponseBody
|
2019-07-22 15:00:51 +02:00
|
|
|
public Map getStatistics(){
|
2019-02-16 11:04:41 +01:00
|
|
|
return statsService.getStatistics();
|
|
|
|
}
|
|
|
|
}
|