mirror of
https://github.com/arnaucube/commonroutesServer.git
synced 2026-02-28 05:26:42 +01:00
delete travel implemented
This commit is contained in:
@@ -92,11 +92,11 @@ exports.updateTravel = function(req, res) {
|
||||
|
||||
//DELETE
|
||||
exports.deleteTravel = function(req, res) {
|
||||
ActivityModel.findById(req.params.id, function(err, activity) {
|
||||
activity.remove(function(err) {
|
||||
travelModel.findById(req.params.id, function(err, travel) {
|
||||
travel.remove(function(err) {
|
||||
if(err) return res.send(500, err.message);
|
||||
res.status(200).jsonp(req.params.id);
|
||||
console.log('DELETE /activities/' + req.params.id);
|
||||
console.log('DELETE /traves/' + req.params.id);
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
@@ -136,7 +136,7 @@ exports.login = function(req, res) {
|
||||
// create a token
|
||||
var token = jwt.sign(user, app.get('superSecret'), {
|
||||
//expiresInMinutes: 1440 // expires in 24 hours
|
||||
expiresIn: '60m'
|
||||
//expiresIn: '60m'
|
||||
});
|
||||
console.log(user);
|
||||
// return the information including token as JSON
|
||||
|
||||
Reference in New Issue
Block a user