|
@@ -1,9 +1,10 @@
|
|
|
import APIHandler from "./APIHandler";
|
|
|
-import { ARTICLE_COMMENTS_URL, ARTICLE_DETAIL_URL, ARTICLE_RECOMMENDATIONS_URL, ARTICLE_SEARCH_URL, MENUS_URL, TRENDING_URL } from "./urls";
|
|
|
+import { ARTICLE_CATEGORY_URL, ARTICLE_COMMENTS_URL, ARTICLE_DETAIL_URL, ARTICLE_RECOMMENDATIONS_URL, ARTICLE_SEARCH_URL, MENUS_URL, TRENDING_URL } from "./urls";
|
|
|
|
|
|
export const getTrendingNews = () => APIHandler.get(TRENDING_URL)
|
|
|
export const getMenus = () => APIHandler.get(MENUS_URL)
|
|
|
-export const getArticlesByCategory = (category,page = 1) => APIHandler.get(ARTICLE_SEARCH_URL(category,page))
|
|
|
+export const getArticlesByCategory = (category,page = 1) => APIHandler.get(ARTICLE_CATEGORY_URL(category,page))
|
|
|
+export const getArticlesBySearch = (category,page = 1) => APIHandler.get(ARTICLE_SEARCH_URL(category,page))
|
|
|
export const getArticleBySlug = (slug) => APIHandler.get(ARTICLE_DETAIL_URL(slug))
|
|
|
export const getCommentByArticleID = (id) => APIHandler.get(ARTICLE_COMMENTS_URL(id))
|
|
|
export const getRecommendationByArticleID = (id) => APIHandler.get(ARTICLE_RECOMMENDATIONS_URL(id))
|