From 8f9b5b112de4db3e3346f1ada6845cb74757e5c3 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Sat, 24 May 2025 23:49:31 +0700 Subject: [PATCH] feta: update sortBy on list article --- services/article.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/article.ts b/services/article.ts index 0fb40f2..5b069fc 100644 --- a/services/article.ts +++ b/services/article.ts @@ -30,7 +30,7 @@ export async function getListArticle(props: PaginationRequest) { "content-type": "application/json", }; return await httpGet( - `/articles?sort=desc&sortBy=published_at&limit=${limit}&page=${page}&isPublish=${ + `/articles?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${ isPublish === undefined ? "" : isPublish }&title=${search}&startDate=${startDate || ""}&endDate=${ endDate || "" @@ -50,7 +50,7 @@ export async function getTopArticles(props: PaginationRequest) { "content-type": "application/json", }; return await httpGet( - `/articles?sort=desc&sortBy=published_at&limit=${limit}&page=${page}&isPublish=${ + `/articles?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${ isPublish === undefined ? "" : isPublish }&title=${search}&startDate=${startDate || ""}&endDate=${ endDate || ""