                                    (iframeio-upload-file "upload-form"
                                                          owner))
                        :action "/api/new-stream"}
-          (dom/input #js {:type "hidden" :name "token"
-                          :value (ck/get "token")} nil)
           (dom/h1 #js {:className "view-title"} "New Stream")
           (:upload-status state)
           (dom/div

                  (om/update-state! owner (fn [old] (assoc old k v))))
            g (fn [k] (get state k))
            fn-post (fn []
                      (client/get "/auth/token"
                                  {:basic-auth {:username (g :username)
                                                :password (g :password)}}))
            fn-clk (fn [_]
                     (go (let [res (<! (fn-post))]
                           (upd :auth res)
                           (ck/set "token" (:token #_:simple-token (:body res))))))]
        (if (= 200 (:status (:auth state)))
          (set! (.-location js/window) "/ui")
          (dom/div nil

  ([f url]
   (call-api f url ""))
  ([f url qs]
   (let [query (str url (if (or (nil? qs) (= "" qs))
                          ""
                          (str "?" qs)))]
     #_(.log js/console query)
     (f query))))

(defn call-oauth [f & args]
  (let [m (if (> (count args) 1)
            (merge (second args) {})
            {})]
    #_(.log js/console (pr-str m))
    (f (first args) m)))

