aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-05-03 04:07:03 -0400
committerJesse Luehrs <doy@tozt.net>2020-05-03 04:09:34 -0400
commitdbdd8a78951f8a44630abcceb7b13d0d823ee074 (patch)
tree64c69f16279876c71ba22a55ef6dd255289aaaef /src/config.rs
parent6ebf7d55e4c553870306a70092cfb677c17429b9 (diff)
downloadrbw-dbdd8a78951f8a44630abcceb7b13d0d823ee074.tar.gz
rbw-dbdd8a78951f8a44630abcceb7b13d0d823ee074.zip
allow storing password databases from different servers
this should allow easy switching of servers by just `rbw config set base_url`
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs6
1 files changed, 6 insertions, 0 deletions
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())
+ }
}