Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -70,7 +70,7 @@ router.get('/show', function(req, res, next) { | ... | @@ -70,7 +70,7 @@ router.get('/show', function(req, res, next) { |
70 | }); | 70 | }); |
71 | } else { | 71 | } else { |
72 | let checkfolder = 'SELECT * FROM folders WHERE folder_id = ? AND user_id = ?;'; | 72 | let checkfolder = 'SELECT * FROM folders WHERE folder_id = ? AND user_id = ?;'; |
73 | - connection.query(checkfolder, [curPath, user_id], function(err, rows) { | 73 | + connection.query(checkfolder, [folder_id, user_id], function(err, rows) { |
74 | if (err) { | 74 | if (err) { |
75 | console.log('select1 error'); | 75 | console.log('select1 error'); |
76 | res.status(400).send({ err: err }); | 76 | res.status(400).send({ err: err }); |
... | @@ -169,7 +169,7 @@ router.post('/delfolder', function(req, res, next) { | ... | @@ -169,7 +169,7 @@ router.post('/delfolder', function(req, res, next) { |
169 | Bucket: BUCKET_NAME, | 169 | Bucket: BUCKET_NAME, |
170 | Key: 'drive/' + curPath + folder_name + '/' | 170 | Key: 'drive/' + curPath + folder_name + '/' |
171 | }; | 171 | }; |
172 | - let infolderpath = cur + name + '/'; | 172 | + let infolderpath = cur + folder_name + '/'; |
173 | let checkinfolder = 'SELECT location FROM folders WHERE location = ? AND user_id = ? UNION ALL SELECT location FROM files WHERE location = ? AND user_id = ?;'; | 173 | let checkinfolder = 'SELECT location FROM folders WHERE location = ? AND user_id = ? UNION ALL SELECT location FROM files WHERE location = ? AND user_id = ?;'; |
174 | connection.query(checkinfolder, [infolderpath, user_id, infolderpath, user_id], function(err, infolder) { | 174 | connection.query(checkinfolder, [infolderpath, user_id, infolderpath, user_id], function(err, infolder) { |
175 | if (err) { | 175 | if (err) { | ... | ... |
-
Please register or login to post a comment