%PDF- %PDF-
| Direktori : /home2/rezakur1/public/api-rezakurnia/src/routes/ |
| Current File : //home2/rezakur1/public/api-rezakurnia/src/routes/article.routes.js |
import express from "express";
import {
getAllArticles,
getArticleBySlug,
getArticleStatistics,
getCategoriesWithCount,
} from "../controllers/article.controller.js";
const router = express.Router();
// GET ALL ARTICLES
router.get("/", getAllArticles);
// 🔥 GET STATISTICS
router.get("/stats", getArticleStatistics);
// 🔥 GET CATEGORIES + COUNT
router.get("/categories", getCategoriesWithCount);
// GET DETAIL BY SLUG (HARUS PALING BAWAH)
router.get("/:slug", getArticleBySlug);
export default router;