workflows

This commit is contained in:
JMARyA 2024-09-12 10:34:14 +02:00
parent 6f9048e5b1
commit a8dfe5f0e9
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
7 changed files with 119 additions and 8 deletions

View file

@ -1,5 +1,6 @@
use std::ops::{Deref, DerefMut};
use flow::FlowInfo;
use json_store::JSONStore;
use location::Location;
@ -55,6 +56,12 @@ async fn rocket() -> _ {
location.1.add(location.0).await;
}
let mut flows: JSONStore<FlowInfo> = JSONStore::new("./flows");
for flow in flows.deref_mut() {
flow.1.add(flow.0).await;
}
let config = config::get_config();
rocket::build()
@ -75,11 +82,15 @@ async fn rocket() -> _ {
routes::item::unique_field_route,
routes::item::location_info,
routes::item::locations_info,
routes::item::locations_list
routes::item::locations_list,
routes::item::location_inventory,
routes::flow::flow_info,
routes::flow::flows_list
],
)
.manage(itemdb)
.manage(locations)
.manage(flows)
.manage(config)
.attach(cors)
}