const express = require('express');
const { getVideos, getVideoById, createVideo, deleteVideo } = require('../controllers/videoController.js');
const authMiddleware = require('../middleware/authMiddleware.js');

const router = express.Router();

router.get('/', getVideos);
router.get('/:id', getVideoById);
router.post('/', authMiddleware, createVideo);
router.delete('/:id', authMiddleware, deleteVideo);

module.exports = router;
