summaryrefslogtreecommitdiff
path: root/lib/db/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db/index.js')
-rw-r--r--lib/db/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/db/index.js b/lib/db/index.js
index 994187e..e7ad632 100644
--- a/lib/db/index.js
+++ b/lib/db/index.js
@@ -53,6 +53,10 @@ db.getUserByUsername = function(username) {
var model = new User({'username': username})
return model.fetch()
}
+db.getLastlog = function(limit){
+ return knex.column('username').column('lastseen').select().from('users').orderBy('lastseen', 'desc').limit(limit || 10)
+}
+
/* THREADS */