diff options
Diffstat (limited to 'lib/db/index.js')
| -rw-r--r-- | lib/db/index.js | 4 |
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 */ |
