This commit is contained in:
parent
bffed5d0b4
commit
5bf6ad6a3c
2 changed files with 6 additions and 1 deletions
|
|
@ -100,12 +100,13 @@ let management_auditors req server _env =
|
||||||
in
|
in
|
||||||
respond_with_res res req
|
respond_with_res res req
|
||||||
|
|
||||||
let management_auditors_disable_jsont = AuditorSetupMessage.jsont
|
let management_auditors_disable_jsont = AuditorTeardownMessage.jsont
|
||||||
|
|
||||||
let management_auditors_disable req auditor_pub server _env =
|
let management_auditors_disable req auditor_pub server _env =
|
||||||
let open Management in
|
let open Management in
|
||||||
let db_conn = Vif.Server.device Devices.db_connection server in
|
let db_conn = Vif.Server.device Devices.db_connection server in
|
||||||
let res =
|
let res =
|
||||||
|
let* auditor_pub = Crypto.EddsaPublicKey.of_b32 auditor_pub in
|
||||||
let* v = Vif.Request.of_json req |> unwrap_err_msg in
|
let* v = Vif.Request.of_json req |> unwrap_err_msg in
|
||||||
let* () = verify_auditor_disable_sig auditor_pub v in
|
let* () = verify_auditor_disable_sig auditor_pub v in
|
||||||
let* () = auditor_disable ~db_conn auditor_pub v in
|
let* () = auditor_disable ~db_conn auditor_pub v in
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,10 @@ let routes =
|
||||||
--> management_signkey_revoke;
|
--> management_signkey_revoke;
|
||||||
post (v "management" / "auditors") management_auditors_jsont
|
post (v "management" / "auditors") management_auditors_jsont
|
||||||
--> management_auditors;
|
--> management_auditors;
|
||||||
|
post
|
||||||
|
(v "management" / "auditors" /% string `Path / "disable")
|
||||||
|
management_auditors_disable_jsont
|
||||||
|
--> management_auditors_disable;
|
||||||
]
|
]
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue