const nodemailer = require('nodemailer');
const Drone = require('../models/Drone');
const User = require('../models/User');
var tmpEmail = User.email;
var listDrones;

/*
Drone.find().where('fUser').eq(tmpEmail).exec(function(err,drns){
	listDrones = drns;
});

exports.getMyDrones = (req, res) => {
	res.render('manage-drones', {title: 'Manage Drones'},{droneList:listDrones});
};
*/
exports.getMyDrones = (req, res) => {
	Drone.find({fUser:tmpEmail},(err,docs)=> {
	res.render('manage-drones', {
	droneList:docs
	});
});
};


@@ -389,33 +389,32 @@
 orts.getMyDrones
- 
 = (req, res) =%3E 
@@ -415,17 +415,18 @@
 s) =%3E %7B%0A
-%09
+  
 Drone.fi
@@ -432,41 +432,29 @@
 ind(
-%7BfUser:tmpEmail%7D,
 (err,
+ 
 docs)
+ 
 =%3E %7B%0A
-%09
+    
 res.
@@ -453,39 +453,32 @@
     res.render('
-manage-
 drones', %7B%0A%09dron
@@ -475,30 +475,28 @@
 ', %7B
-%0A%09
+ 
 drone
-List:
+s: 
 docs
-%0A%09
+ 
 %7D);%0A
+  
 %7D);%0A

Read all drones