Changed all functions in itemstore to use Vec<u8> instead of String

- so that keys/values can be binary files (with invalid utf-8)
- compiler says it works, but not tested at all
This commit is contained in:
Sebastian Moser
2022-09-27 07:21:55 +02:00
parent 15f63c1195
commit e9d93442df
4 changed files with 74 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
pub mod server_utils;
pub mod itemstore;
pub mod proto;
use futures_util::{FutureExt, StreamExt};
use warp::Filter;
@@ -99,7 +100,7 @@ async fn warp_server(mize_folder: String) {
//## $api/rest/
// get itemstore
let itemstore = crate::server::itemstore::itemstore::new(mize_folder + "/db").await;
let itemstore = crate::server::itemstore::Itemstore::new(mize_folder + "/db").await;
let mut clients: Arc<Mutex<Vec<Client>>> = Arc::new(Mutex::new(Vec::new()));