workflows
This commit is contained in:
parent
6f9048e5b1
commit
a8dfe5f0e9
7 changed files with 119 additions and 8 deletions
13
src/main.rs
13
src/main.rs
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue