Merge branch 'prod' of https://gitlab.com/hanifsalafi/web-humas-polri into prod
This commit is contained in:
commit
2c753104f6
|
|
@ -31,7 +31,7 @@ export async function getListArticle(props: PaginationRequest) {
|
|||
"content-type": "application/json",
|
||||
};
|
||||
return await httpGet(
|
||||
`/articles?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${
|
||||
`/articles/public?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${
|
||||
isPublish === undefined ? "" : isPublish
|
||||
}&title=${search}&startDate=${startDate || ""}&endDate=${
|
||||
endDate || ""
|
||||
|
|
@ -80,17 +80,12 @@ export async function getListArticleAdminPage(props: PaginationRequest) {
|
|||
export async function getTopArticles(props: PaginationRequest) {
|
||||
const { page, limit, search, startDate, endDate, isPublish, category } =
|
||||
props;
|
||||
const headers = {
|
||||
"content-type": "application/json",
|
||||
Authorization: `Bearer ${token}`,
|
||||
};
|
||||
return await httpGet(
|
||||
return await httpGetInterceptor(
|
||||
`/articles?sort=desc&sortBy=created_at&limit=${limit}&page=${page}&isPublish=${
|
||||
isPublish === undefined ? "" : isPublish
|
||||
}&title=${search}&startDate=${startDate || ""}&endDate=${
|
||||
endDate || ""
|
||||
}&category=${category || ""}&sortBy=view_count&sort=desc`,
|
||||
headers
|
||||
}&category=${category || ""}&sortBy=view_count&sort=desc`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue