summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app/handler.clj12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/app/handler.clj b/src/app/handler.clj
index 22b2d2d..fdf722e 100644
--- a/src/app/handler.clj
+++ b/src/app/handler.clj
@@ -1,5 +1,7 @@
(ns app.handler
- (:require [castra.middleware :as castra]
+ (:require [app.portmaster :as pm]
+ [app.temperature :as temp]
+ [castra.middleware :as castra]
[compojure.core :as c]
[compojure.route :as route]
[ring.middleware.defaults :as d]
@@ -16,3 +18,11 @@
(d/wrap-defaults d/api-defaults)))
(db/init)
+
+(let [{:keys [init port-name username password]} (db/get :portmaster)]
+ (when init
+ (pm/init port-name username password)))
+
+(let [{:keys [init]} (db/get :temperature)]
+ (when init
+ (temp/init)))