diff options
| author | John Estabrook <jestabro@vyos.io> | 2025-11-23 20:38:54 -0600 |
|---|---|---|
| committer | John Estabrook <jestabro@vyos.io> | 2025-12-02 13:10:41 -0600 |
| commit | 44397fa19950a6d729080051835c079cbf811435 (patch) | |
| tree | 273e2035b90cd395b2d87bfd27c82bb1206de857 /src | |
| parent | f28bad075bc46c95dd2e52037d6e52d1621d2a49 (diff) | |
| download | vyconf-44397fa19950a6d729080051835c079cbf811435.tar.gz vyconf-44397fa19950a6d729080051835c079cbf811435.zip | |
T8032: add config_unsaved request to client module
Diffstat (limited to 'src')
| -rw-r--r-- | src/vyconf_client.ml | 8 | ||||
| -rw-r--r-- | src/vyconf_client.mli | 2 |
2 files changed, 10 insertions, 0 deletions
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 |
