This commit is contained in:
2025-03-07 17:45:17 +08:00
commit 936af0c4ec
114 changed files with 37662 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
import { Hono } from 'hono';
import { getComments, createComment, deleteComment } from '../controllers/commentsController';
import { authMiddleware } from '../middlewares/auth';
const commentsRouter = new Hono();
// Public routes
commentsRouter.get('/', getComments);
// Protected routes
commentsRouter.post('/', authMiddleware, createComment);
commentsRouter.delete('/:comment_id', authMiddleware, deleteComment);
export default commentsRouter;