You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
853 B
Java
29 lines
853 B
Java
|
1 week ago
|
package com.mfsys.controller;
|
||
|
2 weeks ago
|
|
||
|
1 week ago
|
import com.mfsys.constant.LoggerURI;
|
||
|
|
import com.mfsys.model.Logger;
|
||
|
|
import com.mfsys.service.LoggerService;
|
||
|
2 weeks ago
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
||
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
||
|
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
|
||
|
|
import java.time.LocalDate;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
@RestController
|
||
|
|
public class LoggerController {
|
||
|
|
LoggerService loggerService;
|
||
|
|
|
||
|
|
@Autowired
|
||
|
|
LoggerController(LoggerService loggerService) {
|
||
|
|
this.loggerService = loggerService;
|
||
|
|
}
|
||
|
|
|
||
|
|
@GetMapping(LoggerURI.GET_LOGS_BY_DATES)
|
||
|
|
public List<Logger> findLogsBetweenDates(@RequestParam LocalDate fromDate, @RequestParam LocalDate toDate) {
|
||
|
|
return loggerService.findLogsBetweenDates(fromDate, toDate);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|