I´m getting
Error: Route.get() requires a callback function but got a [object Undefined]
This is my route file:
var express = require("express");
var app = express();
var router = express.Router();
var ctrlLocations = require('../controllers/locations');
var ctrlReviews = require('../controllers/reviews');
/**Locations*/
/*router.get('/locations', ctrlLocations.locationsListByDistante);
*/
router.post('/locations', ctrlLocations.locationsCreate);
router.get('/locations/:locationid', ctrlLocations.locationsReadOne);
module.exports = router;
Error LOG:
Error: Route.get() requires a callback function but got a [object Undefined] at Route.(anonymous function) [as get] (C:\Users\Pai\Desktop\mean\node_modules\express\lib\router\route.js:202:15) at Function.proto.(anonymous function) [as get] (C:\Users\Pai\Desktop\mean\node_modules\express\lib\router\index.js:510:19) at Object. (C:\Users\Pai\Desktop\mean\app_api\routes\index.js:14:12) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object. (C:\Users\Pai\Desktop\mean\app.js:22:17) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)