From 8b6940f1c87ac175253b96d43fca6c073cb39e25 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 14 Nov 2023 14:53:46 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=80=20refactor(API/index.ts):=20rename?= =?UTF-8?q?=20'filter=5Fby=5Fuser'=20parameter=20to=20'liked'=20for=20bett?= =?UTF-8?q?er=20clarity=20and=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/controllers/API/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index a8a128a69..73450468e 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -596,7 +596,7 @@ export async function getStoreComponents( is_component?: boolean | null, sort?: string | null, tags?: string[] | null, - filter_by_user?: boolean | null, + liked?: boolean | null, status?: string | null, search?: string | null ): Promise { @@ -619,8 +619,8 @@ export async function getStoreComponents( queryParams.push(`sort=-count(liked_by)`); // default sort } - if (filter_by_user !== undefined && filter_by_user !== null) { - queryParams.push(`filter_by_user=${filter_by_user}`); + if (liked !== undefined && liked !== null) { + queryParams.push(`liked=${liked}`); } if (page !== undefined) {