summaryrefslogtreecommitdiff
path: root/src/utils.clj
diff options
context:
space:
mode:
authorScott Ostler <sostler@deathmachine.local>2010-03-04 23:02:10 -0500
committerScott Ostler <sostler@deathmachine.local>2010-03-04 23:02:10 -0500
commit137fd71eced7732550f448dc42e2422340241d7b (patch)
tree9cd2fa9fa56a7f64d5312d3277efe806612a35b9 /src/utils.clj
parent3dd5aee13e4af1a10bde22737ea099410caaebb1 (diff)
Removed stats
Diffstat (limited to 'src/utils.clj')
-rwxr-xr-xsrc/utils.clj34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/utils.clj b/src/utils.clj
index 5a2c913..3180e89 100755
--- a/src/utils.clj
+++ b/src/utils.clj
@@ -40,40 +40,6 @@
(doall rs))))
:count))
-
-;; Stats
-
-(defn msg-stats [ts]
- (let [qry (str "SELECT created_on::date, count(*) FROM messages "
- "GROUP BY created_on::date "
- "ORDER BY created_on::date")]
- (do-select [qry])))
-
-(defn new-user-stats [ts]
- (let [qry (str "SELECT created_on::date, count(*) FROM users "
- "GROUP BY created_on::date "
- "ORDER BY created_on::date")]
- (do-select [qry])))
-
-(defn msgs-per-user-stats [ts]
- true)
-
-(def *stat-map* {"msgs" msg-stats
- "new users" new-user-stats
- "msgs per user" msgs-per-user-stats})
-
-(defn stats [session params]
- (let [stat (params :stat)
- ts (params :timescale)]
- (if-let [f (*stat-map* stat)]
- (resp-success (f ts))
- (resp-error "UNKNOWN STAT"))))
-
-(defn validated-stats [session params]
- (if (session :is_admin)
- (stats session params)
- (resp-error "BAD_REQUEST")))
-
;; Parsing
(defn maybe-parse-int