mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-20 14:34:24 +01:00
cleanup, use converter
This commit is contained in:
committed by
Carsten Otto
parent
857bfeb5ae
commit
96a84eb675
@@ -19,10 +19,9 @@ public class NodeDetailsController {
|
||||
}
|
||||
|
||||
@GetMapping("/node/{pubkey}")
|
||||
public String nodeDetails(@PathVariable(name = "pubkey") String pubkey, Model model) {
|
||||
public String nodeDetails(@PathVariable Pubkey pubkey, Model model) {
|
||||
try {
|
||||
Pubkey publicKey = Pubkey.create(pubkey);
|
||||
return page.nodeDetails(publicKey).create(model);
|
||||
return page.nodeDetails(pubkey).create(model);
|
||||
} catch (NoSuchElementException e) {
|
||||
return page.error("Node not found.").create(model);
|
||||
} catch (IllegalArgumentException e) {
|
||||
@@ -30,4 +29,4 @@ public class NodeDetailsController {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user