feat: update articles table

This commit is contained in:
hanif salafi 2025-05-26 08:54:22 +07:00
parent 05fcb88efd
commit 2917e703e1
3 changed files with 1 additions and 5 deletions

View File

@ -13,7 +13,6 @@ import { close, error, loading, success, successToast } from "@/config/swal";
import {
deleteArticle,
getArticleByCategory,
getListArticle,
getListArticleAdminPage,
updateIsBannerArticle,
} from "@/services/article";

View File

@ -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

View File

@ -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;