From 4fe69077fc0f33940c5a2403f92b34d2674b4c30 Mon Sep 17 00:00:00 2001 From: e76cd2ec3a63f11710dc9fa0bc5b66176521af0a Date: Sun, 8 Nov 2020 23:54:28 -0800 Subject: [PATCH] chuni: limit response size of getUserActivity --- src/chunithm/sql/userActivity.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chunithm/sql/userActivity.ts b/src/chunithm/sql/userActivity.ts index 0fcad19..39446f0 100644 --- a/src/chunithm/sql/userActivity.ts +++ b/src/chunithm/sql/userActivity.ts @@ -29,7 +29,8 @@ export class SqlUserActivityRepository implements UserActivityRepository { .from("cm_user_activity") .where("profile_id", profileId) .where("kind", kind) - .orderBy("sort_number DESC"); + .orderBy("sort_number DESC") + .limit(100); const rows = await this._txn.fetchRows(stmt);