Skip to content
This repository has been archived by the owner on Nov 19, 2022. It is now read-only.

Commit

Permalink
Fixed namespace misnaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Pakhomov committed Sep 12, 2013
1 parent 48a6306 commit 80d4911
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/xored_task/public.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns xored-task.core
(ns xored-task.public
(:use [xored-task.data]
[xored-task.logic]))

Expand Down
1 change: 0 additions & 1 deletion src/xored_task_webui/pages.clj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(ns xored-task-webui.pages
(:require [xored-task.core :as xtcore])
(:use [hiccup.page :only [html5 include-js include-css]]
[hiccup.form :only [select-options]]))

Expand Down
18 changes: 9 additions & 9 deletions src/xored_task_webui/server.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@
(:require [compojure.route :as route]
[noir.util.middleware :as nm]
[noir.response :as nr]
[xored-task.core :as xtcore]
[xored-task.public :as xt]
[xored-task-webui.pages :as pages]))

(def data-routes
(context "/get-data" []
(GET "/workers" []
(nr/json (xtcore/get-workers)))
(nr/json (xt/get-workers)))
(GET "/projects" []
(nr/json (xtcore/get-projects)))
(nr/json (xt/get-projects)))
(GET "/len" []
(nr/json (xtcore/get-last-event-number)))
(nr/json (xt/get-last-event-number)))
(GET "/events" {{len :len} :params}
(nr/json (when len (xtcore/get-events (Integer/parseInt len)))))))
(nr/json (when len (xt/get-events (Integer/parseInt len)))))))

(def action-routes
(context "/action" []
(GET "/add-projects" {{:keys [n pref-time tasks-n-type tasks-n code]} :params}
(xtcore/add-projects (Integer/parseInt n)
(xt/add-projects (Integer/parseInt n)
(Integer/parseInt pref-time)
(keyword tasks-n-type)
(Integer/parseInt tasks-n)
code)
(nr/empty))
(GET "/add-workers" {{n :n} :params}
(xtcore/add-workers (Integer/parseInt n))
(xt/add-workers (Integer/parseInt n))
(nr/empty))
(GET "/remove-workers" {{names :names} :params}
(doseq [name names] (xtcore/remove-worker name))
(doseq [name names] (xt/remove-worker name))
(nr/empty))
(GET "/reset" []
(xtcore/reset)
(xt/reset)
(nr/redirect "/"))))

(defroutes app-routes
Expand Down

0 comments on commit 80d4911

Please sign in to comment.