1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-31 00:16:47 +01:00

limit to 100, ref #159

This commit is contained in:
sveisvei 2016-10-27 13:12:38 +02:00 committed by Ivar Conradi Østhus
parent b375cb839a
commit bc5a7cd877

View File

@ -15,6 +15,7 @@ module.exports = function (db) {
return db return db
.select(EVENT_COLUMNS) .select(EVENT_COLUMNS)
.from('events') .from('events')
.limit(100)
.orderBy('created_at', 'desc') .orderBy('created_at', 'desc')
.map(rowToEvent); .map(rowToEvent);
} }
@ -23,6 +24,7 @@ module.exports = function (db) {
return db return db
.select(EVENT_COLUMNS) .select(EVENT_COLUMNS)
.from('events') .from('events')
.limit(100)
.whereRaw('data ->> \'name\' = ?', [name]) .whereRaw('data ->> \'name\' = ?', [name])
.orderBy('created_at', 'desc') .orderBy('created_at', 'desc')
.map(rowToEvent); .map(rowToEvent);