Skip to content

Commit

Permalink
Use auth-url config
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasbs committed May 1, 2012
1 parent 4c60e90 commit e5088b3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hsnews/models/user.clj
@@ -1,6 +1,7 @@
(ns hsnews.models.user
(:use somnium.congomongo
[clojure.data.json :only [read-json]])
[clojure.data.json :only [read-json]]
[hsnews.utils :only [auth-url]])
(:require [clj-time.core :as ctime]
[clj-time.coerce :as coerce]
[clj-http.client :as client]
Expand Down Expand Up @@ -69,7 +70,7 @@
(session/put! :hs_id hs_id))

(defn login! [{:keys [username password]}]
(let [request-url "http://localhost:4000/auth"
(let [request-url auth-url
resp (client/post request-url {:throw-exceptions false :form-params {:email username :password password}})]
(if (= 200 (resp :status))
(let [resp-data (read-json (resp :body))
Expand Down

0 comments on commit e5088b3

Please sign in to comment.