diff --git a/web/src/integrationTest/java/de/cotto/lndmanagej/controller/RatingControllerIT.java b/web/src/integrationTest/java/de/cotto/lndmanagej/controller/RatingControllerIT.java index 5f842d6c..a4437eee 100644 --- a/web/src/integrationTest/java/de/cotto/lndmanagej/controller/RatingControllerIT.java +++ b/web/src/integrationTest/java/de/cotto/lndmanagej/controller/RatingControllerIT.java @@ -36,14 +36,14 @@ class RatingControllerIT { @Test void getRatingForPeer() throws Exception { when(ratingService.getRatingForPeer(PUBKEY)).thenReturn(new Rating(123)); - mockMvc.perform(get(PREFIX + "/peer/" + PUBKEY + RATING)) + mockMvc.perform(get(PREFIX + "/node/" + PUBKEY + RATING)) .andExpect(content().json("{\"rating\": 123, \"message\": \"\"}")); } @Test void getRatingForPeer_no_rating() throws Exception { when(ratingService.getRatingForPeer(PUBKEY)).thenReturn(Rating.EMPTY); - mockMvc.perform(get(PREFIX + "/peer/" + PUBKEY + RATING)) + mockMvc.perform(get(PREFIX + "/node/" + PUBKEY + RATING)) .andExpect(content().json("{\"rating\": -1, \"message\": \"Unable to compute rating\"}")); } diff --git a/web/src/main/java/de/cotto/lndmanagej/controller/RatingController.java b/web/src/main/java/de/cotto/lndmanagej/controller/RatingController.java index 4fbf757b..3afee7e3 100644 --- a/web/src/main/java/de/cotto/lndmanagej/controller/RatingController.java +++ b/web/src/main/java/de/cotto/lndmanagej/controller/RatingController.java @@ -24,7 +24,7 @@ public class RatingController { } @Timed - @GetMapping("/peer/{peer}/rating") + @GetMapping("/node/{peer}/rating") public RatingDto getRatingForPeer(@PathVariable Pubkey peer) { Rating rating = ratingService.getRatingForPeer(peer); return RatingDto.fromModel(rating);