Skip to content

Commit

Permalink
made some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikostrik committed Oct 27, 2023
1 parent a7e5243 commit e9b4dca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public class CharacterController {
@Operation(summary = "Get a character",
description = "Get a character by random id")
@GetMapping("/random")
public CharacterDto getCharacterById() {
public CharacterDto getCharacterByRandomId() {
return characterService.getCharacterByRandomId();
}

@Operation(summary = "Search a character",
description = "Get a list of character by name")
@GetMapping("/search")
public List<CharacterDto> search(String name) {
public List<CharacterDto> searchByName(String name) {
return characterService.searchByName(name);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public List<CharacterResponseDto> getCharactersIntoDB() {
}
return characterResponseDtoList;
} catch (IOException | InterruptedException e) {
throw new RuntimeException(e);
throw new RuntimeException("Can't get character data from API.",e);
}
}
}

0 comments on commit e9b4dca

Please sign in to comment.