add endpoint: get all channels for peer

This commit is contained in:
Carsten Otto
2021-11-27 17:35:54 +01:00
parent 280804587e
commit e61cfa6ee2
3 changed files with 31 additions and 0 deletions

View File

@@ -84,6 +84,13 @@ public class NodeController {
return new ChannelsForNodeDto(pubkey, channels);
}
@GetMapping("/all-channels")
public ChannelsForNodeDto getAllChannelIdsForPubkey(@PathVariable Pubkey pubkey) {
mark("getAllChannelIdsForPubkey");
List<ChannelId> channels = toSortedList(channelService.getAllChannelsWith(pubkey));
return new ChannelsForNodeDto(pubkey, channels);
}
@GetMapping("/balance")
public BalanceInformationDto getBalance(@PathVariable Pubkey pubkey) {
mark("getBalance");