Showing
2 changed files
with
6 additions
and
6 deletions
... | @@ -21,19 +21,19 @@ router.get('/:name', function (req, res) { | ... | @@ -21,19 +21,19 @@ router.get('/:name', function (req, res) { |
21 | connection.query(sql1, [file_name, curPath, user_id], function (err) { | 21 | connection.query(sql1, [file_name, curPath, user_id], function (err) { |
22 | if (err) { | 22 | if (err) { |
23 | console.log('delete db error'); | 23 | console.log('delete db error'); |
24 | - res.status(404).send({erorr: 'db delete error'}); | 24 | + res.send({erorr: 'db delete error'}); |
25 | } | 25 | } |
26 | else { | 26 | else { |
27 | connection.query(sql2, [file_name, '/trashcan'+curPath, user_id], function (err) { | 27 | connection.query(sql2, [file_name, '/trashcan'+curPath, user_id], function (err) { |
28 | if (err) { | 28 | if (err) { |
29 | console.log('insert in trashcan db error'); | 29 | console.log('insert in trashcan db error'); |
30 | - res.status(404).send({error: 'db insert error'}); | 30 | + res.send({error: 'db insert error'}); |
31 | } | 31 | } |
32 | else { | 32 | else { |
33 | // /drive/user_id/sourceFile --> /drive/user_id/trashcan/sourceFile | 33 | // /drive/user_id/sourceFile --> /drive/user_id/trashcan/sourceFile |
34 | S3.moveFile2(S3.BUCKET_NAME, user_id, sourceFile, targetPath, function (result) { | 34 | S3.moveFile2(S3.BUCKET_NAME, user_id, sourceFile, targetPath, function (result) { |
35 | if (result) { | 35 | if (result) { |
36 | - res.satus(200).send("move to trashcan success"); | 36 | + res.send("move to trashcan success"); |
37 | } | 37 | } |
38 | }) | 38 | }) |
39 | } | 39 | } | ... | ... |
1 | { | 1 | { |
2 | - "accessKeyId": "ASIAZQ5XTMMFRYJNKBIQ", | 2 | + "accessKeyId": "ASIAZQ5XTMMF77IHPTR6", |
3 | - "secretAccessKey": "NNsqT/NamEdilVYzp/dS8ys2MMlEDEmyreZb6VLJ", | 3 | + "secretAccessKey": "IIDj5U3n6603WcAOf2OMTj2V6urKuGQaRGXABtVd", |
4 | - "sessionToken": "FwoGZXIvYXdzELP//////////wEaDJMOjkb8lIC9vGm9uCLDAWLA9QiZ4tlf+5oJaJE3MQeD6PKFGE1xTVNBTIKOY6ROuMC+sHfKVONokm+comkRD5z2Mi4l7XxSQDmOM3TtcuxwsJWw5aIKKUUUqCQbzqEy2JSAsJxBMUDiUGQnIlYJDCuB+uWWvfgAxUrDz/ReJQeXmpuFOVIymn12jTXy4scLZcz22cpiZj4pr9d05VOkzUyXozIHGEVEHgIV1qdy5sJLMicz4RQi4+bIuE5w4lCYdpk0nzduAHStgyWEN0/VjEbJSCiG48b2BTIt675GjnR/TJwYd8BOnqKzAwQyF4WxMzAgJ2NaCwPcE0ZR2/KVYQoIO1Os/Vk6", | 4 | + "sessionToken": "FwoGZXIvYXdzENH//////////wEaDLvwZHLSr6GbUZyD0yLDAVKxxzxNeyC41xtvOmvV9Xmeor5N/Uy6byi1/D/9K6OoGSwdgPNlyyz5EzCsB3UDWtyWGSmIX9PreX0FX2wnD5/VHDl9QibRMUpXOBlg95BNHrfx0e7Srfn6a1GY8eN9ntiqiv7DuS3jV7I7L9NOE218dxDnt4hul8gStVZ4urSXlz4KUAXLucCbF4y2c/KuDVqKPM/9+MQgnL6f3bHThwNEhZhm4CjyHQYZgB2eGd9HYi95RYC9NglBi1gH60Iao8AELSi8wc32BTItNSdy9ymXld6zjj9OnqNzUZdm+GdCX8qFQ87nzVzmX7kHEOWnK9x+4zTHbGXx", |
5 | "region": "us-east-1" | 5 | "region": "us-east-1" |
6 | } | 6 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment