   (if (= nil (masavi-form-validator @data-set))
     (do (reset! data-set (assoc @data-set :villageid (int (.-value (.getElementById js/document "masavi-districts")))))
         (let [onres (fn[json] (secretary/dispatch! "/masavi"))]
-          (http-post "http://localhost:9000/masavis" onres  (.serialize (Serializer.) (clj->js @data-set)))))
+          (http-post (str serverhost "masavis") onres  (.serialize (Serializer.) (clj->js @data-set)))))
   (reset! focus "on")))
 
 

                  (set-key-value :total-pages (get-total-rec-no (.-pagesCount dt)))
                  (set-key-value :page-location  [render-fieldbook (get-value! :fieldbooks)])))]
    (set-key-value :is-searched-results false)
    (http-get (str "http://localhost:9000/fieldbooks?pageIndex="(dec (get-value! :current-page))"&pageSize=10") onres)))


(defroute fieldbook-add-path "/fieldbook/add" []
  (let [onres (fn[json](
                        (set-key-value :villages (getdata json))
                        (set-page! [fieldbook-add-template])))]
    (http-get "http://localhost:9000/villages" onres)))

(defroute fieldbook-upd-path "/fieldbook/update/:id" [id]
  (let [onres (fn[json](

                       (set-page! [mutation-update-template id
                                   (first (filter (fn[obj]
                                                    (=(.-id obj) (.parseInt js/window id))) (get-value! :mutations)))])))]
    (http-get (str serverhost "villages") onres)))

;; ---------------------------------------------------------
;; rvenue-records
