Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
449 B
2
Indexable
Never
import express from 'express'
import multer from 'multer'
import checkAuth from '../middleware/authMW.js'
import { 
    menu,
    create,
    adminMenu,
    adminList
} from '../controllers/menuCO.js';
const upload = multer();

const router = express.Router();

router.get('/', menu)
router.get('/menu', checkAuth, adminMenu)
router.get('/list/:id', checkAuth, adminList)
router.post('/create', upload.single('image'), create)

export default router