mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-24 08:24:20 +01:00
make x default in compact form, remove unused endpoint from legacy controller, add compact forms to channel details
This commit is contained in:
@@ -61,14 +61,6 @@ public class LegacyController {
|
||||
.collect(Collectors.joining(NEWLINE));
|
||||
}
|
||||
|
||||
@GetMapping("/open-channels/compact")
|
||||
public String getOpenChannelIdsCompact() {
|
||||
mark("getOpenChannelIdsCompact");
|
||||
return getOpenChannelIdsSorted()
|
||||
.map(ChannelId::getCompactForm)
|
||||
.collect(Collectors.joining(NEWLINE));
|
||||
}
|
||||
|
||||
@GetMapping("/open-channels/pretty")
|
||||
public String getOpenChannelIdsPretty() {
|
||||
mark("getOpenChannelIdsPretty");
|
||||
|
||||
@@ -6,8 +6,20 @@ import de.cotto.lndmanagej.model.Pubkey;
|
||||
|
||||
public record ChannelDetailsDto(
|
||||
ChannelId channelId,
|
||||
String channelIdCompact,
|
||||
String channelIdCompactLnd,
|
||||
Pubkey remotePubkey,
|
||||
String remoteAlias,
|
||||
@JsonProperty("private") boolean privateChannel
|
||||
) {
|
||||
public ChannelDetailsDto(ChannelId channelId, Pubkey remotePubkey, String remoteAlias, boolean privateChannel) {
|
||||
this(
|
||||
channelId,
|
||||
channelId.getCompactForm(),
|
||||
channelId.getCompactFormLnd(),
|
||||
remotePubkey,
|
||||
remoteAlias,
|
||||
privateChannel
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user