mirror of
https://github.com/arnaucube/commonroutesServer.git
synced 2026-02-28 05:26:42 +01:00
routes
This commit is contained in:
@@ -53,7 +53,7 @@ exports.addTravel = function(req, res) {
|
||||
seats: req.body.seats,
|
||||
package: req.body.package,
|
||||
collectivized: req.body.collectivized,
|
||||
type: req.body.modality
|
||||
type: req.body.type
|
||||
});
|
||||
|
||||
travel.save(function(err, travel) {
|
||||
|
||||
@@ -111,7 +111,7 @@ exports.getAllUsers = function(req, res) {
|
||||
exports.getUserById = function (req, res) {
|
||||
userModel.findOne({_id: req.params.userid})
|
||||
.lean()
|
||||
.populate('travels', 'title from to date')
|
||||
.populate('travels', 'title from to date type')
|
||||
.exec(function (err, user) {
|
||||
if (err) return res.send(500, err.message);
|
||||
if (!user) {
|
||||
|
||||
Reference in New Issue
Block a user