Skip to content

Commit

Permalink
Fixing typos
Browse files Browse the repository at this point in the history
  • Loading branch information
lucashsilva committed May 6, 2017
1 parent 16bb517 commit 6460f43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/routes/heros_routes.js → app/routes/hero_routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ module.exports = function(app) {
var apiRoutes = express.Router();

apiRoutes.get('/', passport.authenticate('jwt', { session: false }), function(req, res) {
Hero.find({}, {_id: 0, __v: 0}, function(err, heros) {
Hero.find({}, {_id: 0, __v: 0}, function(err, heroes) {
if(err) {
res.json(err);
} else {
res.json(heros);
res.json(heroes);
}
}).skip(parseInt(req.query['offset'] || 0)).limit(parseInt(req.query['limit'] || 20));
});

// Set url for API group routes
app.use('/api/heros', apiRoutes);
app.use('/api/heroes', apiRoutes);
};
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ app.use(passport.initialize());
require('./config/passport')(passport);

require('./app/routes/user_routes')(app);
require('./app/routes/heros_routes')(app);
require('./app/routes/hero_routes')(app);
var server = require('http').createServer(app);

// Start the server
Expand Down

0 comments on commit 6460f43

Please sign in to comment.