source: src/main/java/com/example/skychasemk/controller/TopMonthlyReportController.java

Last change on this file was 62bba0c, checked in by ste08 <sjovanoska@…>, 4 months ago

Report working, Wishlist partly working.

  • Property mode set to 100644
File size: 612 bytes
RevLine 
[a70b5a4]1package com.example.skychasemk.controller;
2
3import com.example.skychasemk.model.TopMonthlyReport;
[62bba0c]4import com.example.skychasemk.repository.TopMonthlyReportRepository;
[a70b5a4]5import org.springframework.beans.factory.annotation.Autowired;
[62bba0c]6import org.springframework.ui.Model;
[a70b5a4]7import org.springframework.web.bind.annotation.*;
8
9import java.util.List;
10
11@RestController
[62bba0c]12@RequestMapping("/api/views")
[a70b5a4]13public class TopMonthlyReportController {
14 @Autowired
[62bba0c]15 private TopMonthlyReportRepository repository;
16
[a70b5a4]17
[62bba0c]18 @GetMapping
[a70b5a4]19 public List<TopMonthlyReport> getAllReports() {
[62bba0c]20 return repository.findAll();
[a70b5a4]21 }
22
23}
Note: See TracBrowser for help on using the repository browser.