summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/site.clj7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/site.clj b/src/site.clj
index c9b484b..98fde79 100644
--- a/src/site.clj
+++ b/src/site.clj
@@ -853,7 +853,7 @@ WHERE u.user_id = ANY(?)"
(defn redis-ids-test [period]
(let [reddis-server {:host "127.0.0.1" :port 6379 :db 0}
ids (redis/with-server reddis-server
- (redis/zrevrange (str "hiscore." period) 0 20))
+ (redis/zrevrange (str "hiscore:" period) 0 -1))
ids (map maybe-parse-int ids)]
ids))
@@ -872,6 +872,9 @@ WHERE u.user_id = ANY(?)"
;; Altars
+;; if :nick is in params, will fetch only altars by that nick
+;; next page links look like /altars/message-id and select <= message_id order desc
+;; prev page links look like /altars/-message-id and select > message_id order asc
(defn altar-log [session params]
(let [id (params :id)
nick (params :nick)
@@ -1328,6 +1331,8 @@ WHERE u.user_id = ANY(?)"
;; testing
(GET "/test/hiscores" (hiscore-test session params "week"))
+ (GET "/test/hiscores/alltime" (hiscore-test session params "all"))
+ (GET "/test/hiscores/day" (hiscore-test session params "day"))
(GET "/test/hiscores/week" (hiscore-test session params "week"))
(GET "/test/hiscores/month" (hiscore-test session params "month"))