Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- router.route('/deletePictureLog/:picture_id')
- .post(upload.array(), function(req, res) {
- picture_id = req.params.picture_id;
- connection.query("DELETE FROM picture WHERE id = ?", [picture_id], function(error, results, fields) {
- if (error)
- res.json({
- status: 500,
- error: error
- });
- connection.query("DELETE FROM log WHERE picture_id = ?", [picture_id], function(error, results, fields) {
- if (error)
- res.json({
- status: 500,
- error: error
- });
- res.json({
- status: 200,
- message: "LOG_PICTURE_DELETED"
- });
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement