This commit is contained in:
JMARyA 2024-09-12 10:17:14 +02:00
parent e7fe303941
commit 6f9048e5b1
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
6 changed files with 92 additions and 56 deletions

View file

@ -1,4 +1,4 @@
use std::ops::Deref;
use std::ops::{Deref, DerefMut};
use json_store::JSONStore;
use location::Location;
@ -49,10 +49,10 @@ async fn rocket() -> _ {
.expect("error creating CORS options");
let itemdb = db::ItemDB::new("./itemdb").await;
let locations: JSONStore<Location> = JSONStore::new("./locations");
let mut locations: JSONStore<Location> = JSONStore::new("./locations");
for location in locations.deref() {
location.1.clone().add(location.0).await;
for location in locations.deref_mut() {
location.1.add(location.0).await;
}
let config = config::get_config();