diff options
| author | Scott Ostler <sostler@deathmachine.local> | 2010-02-25 09:42:18 -0500 |
|---|---|---|
| committer | Scott Ostler <sostler@deathmachine.local> | 2010-02-25 09:42:18 -0500 |
| commit | 1a543c1a104e885567f1adb296859ead3d098ea4 (patch) | |
| tree | 59edb321684ea84c0c2eaf231659b3a94088b5b5 /src | |
| parent | af00dc516ad125f01189f673ff3d3b35738086fc (diff) | |
Fixed updating avatar-url
Diffstat (limited to 'src')
| -rwxr-xr-x | src/site.clj | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/site.clj b/src/site.clj index 60f07d7..48ba39e 100755 --- a/src/site.clj +++ b/src/site.clj @@ -339,10 +339,10 @@ (with-connection *db* (update-values "users" ["user_id = ?" user-id] {attr val}))) -(defn download-avatar [session url] - (let [url false] - (update-user-db (session :user_id) "avatar" url) - (resp-success url))) +(defn update-avatar [session url] + (update-user-db (session :user_id) "avatar" url) + [(session-assoc :avatar url) + (resp-success url)]) (defn update-profile [session params] (let [user-id (session :user_id) @@ -352,7 +352,7 @@ (cond (not user-id) (resp-error "MUST_LOGIN") (not (and user-id attr val)) (resp-error "BAD_REQUEST") (not (contains? attr-set attr)) (resp-error "BAD_REQUEST") - (= attr "avatar") (download-avatar session val) + (= attr "avatar") (update-avatar session val) :else (do (update-user-db user-id attr val) (resp-success "OK"))))) |
