src/section_config.rs: make set_data generic

This commit is contained in:
Dietmar Maurer
2020-01-11 11:09:27 +01:00
parent 688fbe07a1
commit 50af953e1b
3 changed files with 17 additions and 12 deletions

View File

@ -74,7 +74,7 @@ pub fn create_datastore(name: String, param: Value) -> Result<(), Error> {
let backup_user = crate::backup::backup_user()?;
let _store = ChunkStore::create(&name, path, backup_user.uid, backup_user.gid)?;
config.set_data(&name, "datastore", serde_json::to_value(datastore)?);
config.set_data(&name, "datastore", &datastore)?;
datastore::save_config(&config)?;