From 6c7c407694b8598cfc529610f64ee4741765fa3c Mon Sep 17 00:00:00 2001 From: sveisvei Date: Thu, 27 Oct 2016 13:12:38 +0200 Subject: [PATCH] limit to 100, ref #159 --- packages/unleash-api/lib/db/event.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/unleash-api/lib/db/event.js b/packages/unleash-api/lib/db/event.js index a47f061def..5aba0ddaff 100644 --- a/packages/unleash-api/lib/db/event.js +++ b/packages/unleash-api/lib/db/event.js @@ -15,6 +15,7 @@ module.exports = function (db) { return db .select(EVENT_COLUMNS) .from('events') + .limit(100) .orderBy('created_at', 'desc') .map(rowToEvent); } @@ -23,6 +24,7 @@ module.exports = function (db) { return db .select(EVENT_COLUMNS) .from('events') + .limit(100) .whereRaw('data ->> \'name\' = ?', [name]) .orderBy('created_at', 'desc') .map(rowToEvent);