From a55faa34e1660529cf8cc07489ca88329abcaffb Mon Sep 17 00:00:00 2001 From: arnaucode Date: Wed, 26 Jul 2017 18:27:28 +0200 Subject: [PATCH] implemented admin delete travel and user --- controllers/adminController.js | 346 ++++++++++++++++++++++----------- server.js | 4 + 2 files changed, 233 insertions(+), 117 deletions(-) diff --git a/controllers/adminController.js b/controllers/adminController.js index f15a63c..28e3ce8 100644 --- a/controllers/adminController.js +++ b/controllers/adminController.js @@ -2,7 +2,9 @@ var mongoose = require('mongoose'); var adminModel = mongoose.model('adminModel'); var userModel = mongoose.model('userModel'); +var notificationModel = mongoose.model('notificationModel'); var travelModel = mongoose.model('travelModel'); +var travelCtrl = require('../controllers/travelController'); var config = require('../config'); var pageSize = config.pageSize; @@ -120,129 +122,239 @@ exports.changePassword = function(req, res) { }); }; -function isNodeInNodes(node, nodes){ - for (var i=0; i