fix use app.use(router) to add sub router
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
|
||||
module.exports = function(app) {
|
||||
var router = app.Router();
|
||||
var router = app.loopback.Router();
|
||||
var Nonprofit = app.models.Nonprofit;
|
||||
|
||||
router.get('/nonprofits/directory', nonprofitsDirectory);
|
||||
router.get('/nonprofits/:nonprofitName', returnIndividualNonprofit);
|
||||
|
||||
app.use(router);
|
||||
|
||||
function nonprofitsDirectory(req, res, next) {
|
||||
Nonprofit.find(
|
||||
{ where: { estimatedHours: { $gt: 0 } } },
|
||||
|
||||
Reference in New Issue
Block a user