This commit is contained in:
JMARyA 2024-10-07 21:02:23 +02:00
parent 1faa3b9668
commit 6677434ca0
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
3 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@ use std::collections::HashMap;
use crate::item::Item; use crate::item::Item;
/// Item database /// Item database
#[derive(Debug)] #[derive(Debug, Clone)]
pub struct ItemDB { pub struct ItemDB {
index: HashMap<String, Item>, index: HashMap<String, Item>,
} }

View file

@ -5,7 +5,7 @@ use std::{
use serde::Deserialize; use serde::Deserialize;
#[derive(Debug)] #[derive(Debug, Clone)]
pub struct JSONStore<T> { pub struct JSONStore<T> {
documents: HashMap<String, T>, documents: HashMap<String, T>,
} }

View file

@ -99,8 +99,8 @@ async fn rocket() -> _ {
.expect("error creating CORS options"); .expect("error creating CORS options");
let config = config::get_config(); let config = config::get_config();
let itemdb = get_itemdb!(); let itemdb = get_itemdb!().clone();
let locations = get_locations!(); let locations = get_locations!().clone();
let flows: JSONStore<FlowInfo> = JSONStore::new("./flows"); let flows: JSONStore<FlowInfo> = JSONStore::new("./flows");
integrity::verify_integrity(&config, &flows, &locations, &itemdb).await; integrity::verify_integrity(&config, &flows, &locations, &itemdb).await;