Hong

.

...@@ -47,14 +47,14 @@ router.get('/show', function(req, res, next) { ...@@ -47,14 +47,14 @@ router.get('/show', function(req, res, next) {
47 folder_id = req.query.folder_id; 47 folder_id = req.query.folder_id;
48 if (folder_id == -1) { 48 if (folder_id == -1) {
49 let location = '/'; 49 let location = '/';
50 - let gerFolder = 'SELECT * FROM folders WHERE location = ? AND user_id = ?;'; 50 + let gerFolder = 'SELECT * FROM folders WHERE location = ? AND user_id = ? AND folder_name != ?;';
51 - connection.query(gerFolder, [location, user_id], function(err, folder) { 51 + connection.query(gerFolder, [location, user_id, 'trashcan'], function(err, folder) {
52 if (err) { 52 if (err) {
53 console.log('select2 error'); 53 console.log('select2 error');
54 res.status(400).send({ err: err }); 54 res.status(400).send({ err: err });
55 } else { 55 } else {
56 - let gerFile = 'SELECT * FROM files WHERE location = ? AND user_id = ? AND folder_name != ?;'; 56 + let gerFile = 'SELECT * FROM files WHERE location = ? AND user_id = ?;';
57 - connection.query(gerFile, [location, user_id, 'trashcan'], function(err, file) { 57 + connection.query(gerFile, [location, user_id], function(err, file) {
58 if (err) { 58 if (err) {
59 console.log('select3 error'); 59 console.log('select3 error');
60 res.status(400).send({ err: err }); 60 res.status(400).send({ err: err });
...@@ -80,8 +80,8 @@ router.get('/show', function(req, res, next) { ...@@ -80,8 +80,8 @@ router.get('/show', function(req, res, next) {
80 res.status(400).send({ err: 'does not exist' }); 80 res.status(400).send({ err: 'does not exist' });
81 } else { 81 } else {
82 let location = rows[0].location + rows[0].folder_name + '/'; 82 let location = rows[0].location + rows[0].folder_name + '/';
83 - let gerFolder = 'SELECT * FROM folders WHERE location = ? AND user_id = ?;'; 83 + let gerFolder = 'SELECT * FROM folders WHERE location = ? AND user_id = ? AND folder_name != ?;';
84 - connection.query(gerFolder, [location, user_id], function(err, folder) { 84 + connection.query(gerFolder, [location, user_id, 'trashcan'], function(err, folder) {
85 if (err) { 85 if (err) {
86 console.log('select2 error'); 86 console.log('select2 error');
87 res.status(400).send({ err: err }); 87 res.status(400).send({ err: err });
......