This repository has been archived on 2020-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
e-commerce/web_backend/src/main/java/org/hso/ecommerce/controller/intern/DashboardController.java

26 lines
826 B
Java
Raw Normal View History

2020-06-15 17:47:55 +02:00
package org.hso.ecommerce.controller.intern;
import org.hso.ecommerce.entities.dashboard.DashboardSummary;
import org.hso.ecommerce.repos.dashboard.DashboardSummaryRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.PageRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
public class DashboardController {
@Autowired
private DashboardSummaryRepository dashboardSummaryRepository;
@GetMapping("/intern/dashboardsummary")
public List<DashboardSummary> getDashboardEntries()
{
List<DashboardSummary> inTimespan = dashboardSummaryRepository.findInTimespan(PageRequest.of(0, 7) );
return inTimespan;
}
}