fix
This commit is contained in:
parent
1faa3b9668
commit
6677434ca0
3 changed files with 4 additions and 4 deletions
|
@ -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>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue