You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
460 B
12 lines
460 B
const express = require('express');
|
|
const router = express.Router();
|
|
const { authenticateToken } = require('../middlewares/auth');
|
|
const { getProductList, getProductDetail } = require('../controllers/productController');
|
|
|
|
// 获取商品列表(需要认证)
|
|
router.get('/products', authenticateToken, getProductList);
|
|
|
|
// 获取单个商品详情(需要认证)
|
|
router.get('/products/:id', authenticateToken, getProductDetail);
|
|
|
|
module.exports = router; |