答案 0 :(得分:0)
将此添加到textView
module.exports = (function () {
var express = require( 'express' ),
router = express.Router(),
create_product = require( './create-product.controller.js' ),
list_product = require( './list-product.controller.js' ),
detail_product = require( './detail-product.controller.js' ),
update_product = require( './update-product.controller.js' );
router.route( '/api/v1/purchases/products/new' )
.post( create_product.post );
router.route( '/api/v1/purchases/products/list' )
.get( list_product.get );
router.route( '/api/v1/purchases/products/detail/:id' )
.get( detail_product.get );
router.route( '/api/v1/purchases/products/update' )
.put( update_product.put );
return router;
})();