feat(main): register control engine routes and start engine
This commit is contained in:
parent
856c888667
commit
d2bd567799
16
src/main.rs
16
src/main.rs
|
|
@ -217,6 +217,22 @@ fn build_router(state: AppState) -> Router {
|
||||||
"/api/control/equipment/{equipment_id}/stop",
|
"/api/control/equipment/{equipment_id}/stop",
|
||||||
post(handler::control::stop_equipment),
|
post(handler::control::stop_equipment),
|
||||||
)
|
)
|
||||||
|
.route(
|
||||||
|
"/api/control/unit/{unit_id}/start-auto",
|
||||||
|
post(handler::control::start_auto_unit),
|
||||||
|
)
|
||||||
|
.route(
|
||||||
|
"/api/control/unit/{unit_id}/stop-auto",
|
||||||
|
post(handler::control::stop_auto_unit),
|
||||||
|
)
|
||||||
|
.route(
|
||||||
|
"/api/control/unit/{unit_id}/ack-fault",
|
||||||
|
post(handler::control::ack_fault_unit),
|
||||||
|
)
|
||||||
|
.route(
|
||||||
|
"/api/unit/{unit_id}/runtime",
|
||||||
|
get(handler::control::get_unit_runtime),
|
||||||
|
)
|
||||||
.route(
|
.route(
|
||||||
"/api/tag",
|
"/api/tag",
|
||||||
get(handler::tag::get_tag_list).post(handler::tag::create_tag),
|
get(handler::tag::get_tag_list).post(handler::tag::create_tag),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue