1 | package org.cardanofoundation.explorer.api.controller; | |
2 | ||
3 | import lombok.RequiredArgsConstructor; | |
4 | ||
5 | import org.springframework.http.ResponseEntity; | |
6 | import org.springframework.web.bind.annotation.GetMapping; | |
7 | import org.springframework.web.bind.annotation.RequestMapping; | |
8 | import org.springframework.web.bind.annotation.RequestParam; | |
9 | import org.springframework.web.bind.annotation.RestController; | |
10 | ||
11 | import io.swagger.v3.oas.annotations.Operation; | |
12 | import io.swagger.v3.oas.annotations.tags.Tag; | |
13 | ||
14 | import org.cardanofoundation.explorer.api.config.LogMessage; | |
15 | import org.cardanofoundation.explorer.api.service.NewsService; | |
16 | ||
17 | @RestController | |
18 | @RequestMapping("/api/v1/news") | |
19 | @RequiredArgsConstructor | |
20 | @Tag(name = "news", description = "The news APIs") | |
21 | public class NewsController { | |
22 | ||
23 | private final NewsService newsService; | |
24 | ||
25 | @GetMapping | |
26 | @LogMessage | |
27 | @Operation( | |
28 | summary = "Get news related to cardano", | |
29 | tags = {"news"}) | |
30 | public ResponseEntity<Object> getNews(@RequestParam Integer limit, @RequestParam Integer offset) { | |
31 |
1
1. getNews : replaced return value with null for org/cardanofoundation/explorer/api/controller/NewsController::getNews → KILLED |
return ResponseEntity.ok(newsService.getNews(limit, offset)); |
32 | } | |
33 | } | |
Mutations | ||
31 |
1.1 |