diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-06-18 23:32:39 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-06-18 23:32:39 +0200 |
commit | 4577e01091607fa521b6f488cff2ef258caeaee0 (patch) | |
tree | e02d0a1bccd560aec2c5579ca6e9a2f742613220 /src | |
parent | c416d211c261292d77d45ab12f10ce44b6ac036b (diff) |
Fix profile page handling.
Diffstat (limited to 'src')
-rw-r--r-- | src/mulk/benki/id.clj | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mulk/benki/id.clj b/src/mulk/benki/id.clj index 20925e7..5e6376f 100644 --- a/src/mulk/benki/id.clj +++ b/src/mulk/benki/id.clj @@ -126,11 +126,14 @@ (defpage [:post "/openid/api"] {} (process-openid-request)) -(defpage [:get "/id/:nickname"] {nickname :nickname} +(defn render-profile-page [nickname] (if (re-find #"application/xrds\+xml" (get-in (request/ring-request) [:headers "accept"])) (render-xrds nickname) (show-profile-page (nickname-user nickname)))) +(defpage [:get "/id/:nickname"] {nickname :nickname} + (render-profile-page nickname)) + (defpage [:get "/~:nickname"] {nickname :nickname} - (redirect (link :profile nickname))) + (render-profile-page nickname)) |