Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod
This commit is contained in:
commit
365ecc3283
|
|
@ -13,7 +13,6 @@ import { close, error, loading, success, successToast } from "@/config/swal";
|
|||
import {
|
||||
deleteArticle,
|
||||
getArticleByCategory,
|
||||
getListArticle,
|
||||
getListArticleAdminPage,
|
||||
updateIsBannerArticle,
|
||||
} from "@/services/article";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue