Newer
Older
const db = require('../models/db');
exports.getMovieInformations = (req,res,next) => {
let filmId = req.params.id;
db.query('SELECT * FROM Film WHERE tconst = ?',
[filmId],function (error,results,fields) {
if (error) {
res.status(500).json({error});
} else {
let infos = results[0];
res.status(200).json(infos);
}
})
};