From e5088b3e14fc83c0b8dbf9db5444a7f8ac96f2d1 Mon Sep 17 00:00:00 2001 From: Nicholas Bergson-Shilcock Date: Tue, 1 May 2012 14:03:29 -0400 Subject: [PATCH] Use auth-url config --- src/hsnews/models/user.clj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hsnews/models/user.clj b/src/hsnews/models/user.clj index 65f6c4c..9a2350b 100644 --- a/src/hsnews/models/user.clj +++ b/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] @@ -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))