Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -18,7 +18,7 @@ router.post('/', function(req, res, next) { | ... | @@ -18,7 +18,7 @@ router.post('/', function(req, res, next) { |
18 | let target_id = req.body.target_id; | 18 | let target_id = req.body.target_id; |
19 | 19 | ||
20 | let checkfile = 'SELECT * FROM files WHERE location = ? AND file_name = ? AND user_id = ?'; | 20 | let checkfile = 'SELECT * FROM files WHERE location = ? AND file_name = ? AND user_id = ?'; |
21 | - connection.query(checkfile, [curPath, name, user_id], function(err1, rows, fields) { | 21 | + connection.query(checkfile, [cur, name, user_id], function(err1, rows, fields) { |
22 | if (rows.length != 0) { | 22 | if (rows.length != 0) { |
23 | let copy_params = { | 23 | let copy_params = { |
24 | Bucket: BUCKET_NAME, | 24 | Bucket: BUCKET_NAME, |
... | @@ -43,6 +43,7 @@ router.post('/', function(req, res, next) { | ... | @@ -43,6 +43,7 @@ router.post('/', function(req, res, next) { |
43 | } | 43 | } |
44 | }); | 44 | }); |
45 | } else { | 45 | } else { |
46 | + console.log("Does not exist"); | ||
46 | res.status(304).send({ error: "Does not exist" }); | 47 | res.status(304).send({ error: "Does not exist" }); |
47 | } | 48 | } |
48 | }); | 49 | }); | ... | ... |
-
Please register or login to post a comment