add auditors diable

This commit is contained in:
swrup 2025-12-11 04:48:51 +01:00
parent c150ff242c
commit af09c697b8
3 changed files with 45 additions and 1 deletions

View file

@ -99,3 +99,17 @@ let management_auditors req server _env =
Ok ""
in
respond_with_res res req
let management_auditors_disable_jsont = AuditorTeardownMessage.jsont
let management_auditors_disable req auditor_pub server _env =
let open Management in
let db_conn = Vif.Server.device Devices.db_connection server in
let res =
let* auditor_pub = Crypto.EddsaPublicKey.of_b32 auditor_pub in
let* v = Vif.Request.of_json req |> unwrap_err_msg in
let* () = verify_auditor_disable_sig auditor_pub v in
let* () = auditor_disable ~db_conn auditor_pub v in
Ok ""
in
respond_with_res res req