const express = require('express')
const { getAdvertisings, getSingleAdvertising, acceptAdvertising, rejectAdvertising, getAdvertisingCategories, getAdvertisingCategoryById,createAdvertisingCategory , deleteAdvertisingCategory } = require('../../../controllers/panel/advertising/advertisingController')
const { getAdvertisingComments, getAdvertisingCommentDetail, acceptAdvertisingComment } = require('../../../controllers/panel/comments/advertisingCommentController')
const router = express.Router()
router.get('/', getAdvertisings)
router.get('/detail', getSingleAdvertising)
router.post('/accept', acceptAdvertising)
router.post('/reject', rejectAdvertising)

router.get('/comments', getAdvertisingComments)
router.get('/comments/detail', getAdvertisingCommentDetail)
router.post('/comments/accept', acceptAdvertisingComment)

router.post('/advertising-categories', createAdvertisingCategory)
router.delete('/advertising-categories/:id', deleteAdvertisingCategory)
// لیست دسته‌بندی‌ها (پشتیبانی از query params)
router.get('/advertising-categories', getAdvertisingCategories);

// گرفتن یک دسته‌بندی با id
router.get('/advertising-categories/:id', getAdvertisingCategoryById);

module.exports = router
