mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-27 09:54:51 +01:00
accept channel ID in all supported formats
This commit is contained in:
committed by
Carsten Otto
parent
7a2afd71a2
commit
cf03cf259e
@@ -17,13 +17,13 @@ public class ChanDetailsController {
|
||||
this.page = pageService;
|
||||
}
|
||||
|
||||
@GetMapping("/channel/{id}")
|
||||
public String channelDetails(@PathVariable(name = "id") long channelId, Model model) {
|
||||
@GetMapping("/channel/{channelId}")
|
||||
public String channelDetails(@PathVariable ChannelId channelId, Model model) {
|
||||
try {
|
||||
return page.channelDetails(ChannelId.fromShortChannelId(channelId)).create(model);
|
||||
return page.channelDetails(channelId).create(model);
|
||||
} catch (NotFoundException e) {
|
||||
return page.error("Channel not found.").create(model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user