From 2917e703e148586b65e66379ce01f779e6c778cc Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Mon, 26 May 2025 08:54:22 +0700 Subject: [PATCH] feat: update articles table --- components/table/article-table.tsx | 1 - services/article.ts | 4 ---- services/http-config/axios-interceptor-service.ts | 1 + 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/components/table/article-table.tsx b/components/table/article-table.tsx index 28c5687..db85933 100644 --- a/components/table/article-table.tsx +++ b/components/table/article-table.tsx @@ -13,7 +13,6 @@ import { close, error, loading, success, successToast } from "@/config/swal"; import { deleteArticle, getArticleByCategory, - getListArticle, getListArticleAdminPage, updateIsBannerArticle, } from "@/services/article"; diff --git a/services/article.ts b/services/article.ts index f636d94..4740218 100644 --- a/services/article.ts +++ b/services/article.ts @@ -60,10 +60,6 @@ export async function getListArticleAdminPage(props: PaginationRequest) { categoryIds, createdByIds, } = props; - const headers = { - "content-type": "application/json", - Authorization: `Bearer ${token}`, - }; return await httpGetInterceptor( `/articles?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${ isPublish === undefined ? "" : isPublish diff --git a/services/http-config/axios-interceptor-service.ts b/services/http-config/axios-interceptor-service.ts index 87030af..8a8f8a6 100644 --- a/services/http-config/axios-interceptor-service.ts +++ b/services/http-config/axios-interceptor-service.ts @@ -20,6 +20,7 @@ axiosInterceptorInstance.interceptors.request.use( (config) => { console.log("Config interceptor : ", config); const accessToken = Cookies.get("access_token"); + console.log("Token interceptor : ", accessToken); if (accessToken) { if (config.headers) config.headers.Authorization = "Bearer " + accessToken;