summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mulk/benki/id.clj7
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))