mirror of
https://github.com/mimblewimble/grin.git
synced 2025-05-10 03:01:15 +03:00
update api index (GET /v1) to also list peer banning (#486)
This commit is contained in:
parent
b17e42fb42
commit
1159834321
1 changed files with 14 additions and 12 deletions
|
@ -496,19 +496,21 @@ let _ = thread::Builder::new()
|
|||
};
|
||||
|
||||
let route_list = vec!(
|
||||
"get /".to_string(),
|
||||
"get /blocks".to_string(),
|
||||
"get /chain".to_string(),
|
||||
"get /chain/utxos".to_string(),
|
||||
"get /sumtrees/roots".to_string(),
|
||||
"get /sumtrees/lastutxos?n=10".to_string(),
|
||||
"get /sumtrees/lastrangeproofs".to_string(),
|
||||
"get /sumtrees/lastkernels".to_string(),
|
||||
"get /pool".to_string(),
|
||||
"post /pool/push".to_string(),
|
||||
"get /peers/all".to_string(),
|
||||
"get /peers/connected".to_string(),
|
||||
"get blocks".to_string(),
|
||||
"get chain".to_string(),
|
||||
"get chain/utxos".to_string(),
|
||||
"get sumtrees/roots".to_string(),
|
||||
"get sumtrees/lastutxos?n=10".to_string(),
|
||||
"get sumtrees/lastrangeproofs".to_string(),
|
||||
"get sumtrees/lastkernels".to_string(),
|
||||
"get pool".to_string(),
|
||||
"post pool/push".to_string(),
|
||||
"post peers/a.b.c.d:p/ban".to_string(),
|
||||
"get peers/all".to_string(),
|
||||
"get peers/connected".to_string(),
|
||||
);
|
||||
// We allow manually banning, like this:
|
||||
// curl -v -X POST http://127.0.0.1:13413/v1/peers/88.99.251.87:13414/ban
|
||||
let index_handler = IndexHandler { list: route_list };
|
||||
let router = router!(
|
||||
index: get "/" => index_handler,
|
||||
|
|
Loading…
Add table
Reference in a new issue