   (GET "/" [] status)
   (PUT "/reconfigure" {body :body} (let [bodydecoded (decode (slurp body) true)]
                                      (reload-config bodydecoded)))
+  (GET "/reset" [] (reset-cfg))
   (GET "/toggle" [] get-toggle-all)
   (GET "/toggle/:component" [component] (get-toggle-all-for-component component))
   (GET "/toggle/:component/:setting" [component setting] (get-toggle-for-component-and-setting component setting))


(defn reload-config [config]
  (reset! cfg config))

(defresource status
  :allowed-methods [:get]

            [liberator.core :refer [resource defresource]]
            [cheshire.core :refer :all]))

(defn read-default-config []
  (decode (slurp "resources/config.json") true))

(def cfg (atom (read-default-config)))

(defn getoggle
  ([] @cfg)
