From 44397fa19950a6d729080051835c079cbf811435 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Sun, 23 Nov 2025 20:38:54 -0600 Subject: T8032: add config_unsaved request to client module --- src/vyconf_client.ml | 8 ++++++++ src/vyconf_client.mli | 2 ++ 2 files changed, 10 insertions(+) (limited to 'src') diff --git a/src/vyconf_client.ml b/src/vyconf_client.ml index 9250851..76b6680 100644 --- a/src/vyconf_client.ml +++ b/src/vyconf_client.ml @@ -221,3 +221,11 @@ let edit_level_root client = | Success -> Lwt.return (Ok "") | Fail -> Error (Option.value resp.error ~default:"") |> Lwt.return | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return + +let config_unsaved client file = + let req = Config_unsaved {file=file;} in + let%lwt resp = do_request client req in + match resp.status with + | Success -> Lwt.return (Ok "") + | Fail -> Error (Option.value resp.error ~default:"") |> Lwt.return + | _ -> Error (Option.value resp.error ~default:"") |> Lwt.return diff --git a/src/vyconf_client.mli b/src/vyconf_client.mli index 200f960..a3744d7 100644 --- a/src/vyconf_client.mli +++ b/src/vyconf_client.mli @@ -47,3 +47,5 @@ val reset_edit_level : t -> (string, string) result Lwt.t val get_edit_level : t -> (string, string) result Lwt.t val edit_level_root : t -> (string, string) result Lwt.t + +val config_unsaved : t -> string option -> (string, string) result Lwt.t -- cgit v1.2.3