This commit is contained in:
Mateusz Gruszczyński
2026-09-01 22:20:10 +02:00
parent 1cb62c8d0b
commit 16e0d94564
47 changed files with 2565 additions and 117 deletions
+9
View File
@@ -45,6 +45,7 @@ const SPA_ROUTES: &[&str] = &[
"/groups",
"/schedules",
"/automations",
"/flows",
"/simulation",
"/night-mode",
"/home-assistant",
@@ -84,6 +85,12 @@ pub fn router(state: AppState) -> Router {
.route("/api/schedules/:id", get(get_schedule).put(update_schedule).delete(delete_schedule))
.route("/api/automations", get(list_automations).post(create_automation))
.route("/api/automations/:id", get(get_automation).put(update_automation).delete(delete_automation))
.route("/api/flows", get(list_flows).post(create_flow))
.route("/api/flows/import", post(import_flow))
.route("/api/flows/simulate", post(simulate_flow))
.route("/api/flows/:id/export", get(export_flow))
.route("/api/flows/:id/logs", get(flow_logs))
.route("/api/flows/:id", get(get_flow).put(update_flow).delete(delete_flow))
.route("/api/readings", get(readings))
.route("/api/history", get(history))
.route("/api/control-plan", get(control_plan))
@@ -125,6 +132,7 @@ pub fn router(state: AppState) -> Router {
.route("/manifest.webmanifest", get(manifest))
.route("/sw.js", get(service_worker))
.route("/favicon.svg", get(favicon))
.route("/flows/:id", get(index))
.route("/lang/index.json", get(language_index))
.route("/lang/:file", get(language_file))
.merge(protected)
@@ -167,6 +175,7 @@ include!("api/groups.rs");
include!("api/house.rs");
include!("api/schedules.rs");
include!("api/automations.rs");
include!("api/flows.rs");
include!("api/history.rs");
include!("api/events.rs");
include!("api/settings.rs");