feat: update articles table
This commit is contained in:
parent
05fcb88efd
commit
2917e703e1
|
|
@ -13,7 +13,6 @@ import { close, error, loading, success, successToast } from "@/config/swal";
|
||||||
import {
|
import {
|
||||||
deleteArticle,
|
deleteArticle,
|
||||||
getArticleByCategory,
|
getArticleByCategory,
|
||||||
getListArticle,
|
|
||||||
getListArticleAdminPage,
|
getListArticleAdminPage,
|
||||||
updateIsBannerArticle,
|
updateIsBannerArticle,
|
||||||
} from "@/services/article";
|
} from "@/services/article";
|
||||||
|
|
|
||||||
|
|
@ -60,10 +60,6 @@ export async function getListArticleAdminPage(props: PaginationRequest) {
|
||||||
categoryIds,
|
categoryIds,
|
||||||
createdByIds,
|
createdByIds,
|
||||||
} = props;
|
} = props;
|
||||||
const headers = {
|
|
||||||
"content-type": "application/json",
|
|
||||||
Authorization: `Bearer ${token}`,
|
|
||||||
};
|
|
||||||
return await httpGetInterceptor(
|
return await httpGetInterceptor(
|
||||||
`/articles?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${
|
`/articles?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${
|
||||||
isPublish === undefined ? "" : isPublish
|
isPublish === undefined ? "" : isPublish
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ axiosInterceptorInstance.interceptors.request.use(
|
||||||
(config) => {
|
(config) => {
|
||||||
console.log("Config interceptor : ", config);
|
console.log("Config interceptor : ", config);
|
||||||
const accessToken = Cookies.get("access_token");
|
const accessToken = Cookies.get("access_token");
|
||||||
|
console.log("Token interceptor : ", accessToken);
|
||||||
if (accessToken) {
|
if (accessToken) {
|
||||||
if (config.headers)
|
if (config.headers)
|
||||||
config.headers.Authorization = "Bearer " + accessToken;
|
config.headers.Authorization = "Bearer " + accessToken;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue