From dbdd8a78951f8a44630abcceb7b13d0d823ee074 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 3 May 2020 04:07:03 -0400 Subject: allow storing password databases from different servers this should allow easy switching of servers by just `rbw config set base_url` --- src/config.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 5b3cfd3..7bbb928 100644 --- a/src/config.rs +++ b/src/config.rs @@ -77,4 +77,10 @@ impl Config { ) }) } + + pub fn server_name(&self) -> String { + self.base_url + .clone() + .unwrap_or_else(|| "default".to_string()) + } } -- cgit v1.2.3-54-g00ecf