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.RestController; | |
9 | ||
10 | import io.swagger.v3.oas.annotations.Operation; | |
11 | import io.swagger.v3.oas.annotations.tags.Tag; | |
12 | ||
13 | import org.cardanofoundation.explorer.api.config.LogMessage; | |
14 | import org.cardanofoundation.explorer.api.service.SupplyService; | |
15 | ||
16 | @RestController | |
17 | @RequestMapping("/api/v1/supply") | |
18 | @RequiredArgsConstructor | |
19 | @Tag(name = "supply", description = "ada token supply information") | |
20 | public class SupplyController { | |
21 | ||
22 | private final SupplyService supplyService; | |
23 | ||
24 | @GetMapping("/circulating") | |
25 | @LogMessage | |
26 | @Operation( | |
27 | summary = "Get Circulating Supply", | |
28 | description = "returns the ADA token circulating supply", | |
29 | tags = {"supply"}) | |
30 | public ResponseEntity<Long> getSupplyCirculating() { | |
31 |
1
1. getSupplyCirculating : replaced return value with null for org/cardanofoundation/explorer/api/controller/SupplyController::getSupplyCirculating → KILLED |
return ResponseEntity.ok(supplyService.getSupplyCirculating()); |
32 | } | |
33 | ||
34 | @GetMapping("/total") | |
35 | @LogMessage | |
36 | @Operation( | |
37 | summary = "Get Total Supply", | |
38 | description = "returns the ADA token total supply", | |
39 | tags = {"supply"}) | |
40 | public ResponseEntity<Long> getSupplyTotal() { | |
41 |
1
1. getSupplyTotal : replaced return value with null for org/cardanofoundation/explorer/api/controller/SupplyController::getSupplyTotal → KILLED |
return ResponseEntity.ok(supplyService.getSupplyTotal()); |
42 | } | |
43 | } | |
Mutations | ||
31 |
1.1 |
|
41 |
1.1 |