You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const {listGenres}=require('../model/genres'); //this works fine
function get(req, res) {
const title = "Add film";
const categories = listGenres().map(genre=>genre.genre_name);//this will give you the list of all genres
You can console.log categories without map() which gives you array of object from db
I think this is great, you managed to get data from db
Good luck with handling the data from bd
The text was updated successfully, but these errors were encountered:
const {listGenres}=require('../model/genres'); //this works fine
function get(req, res) {
const title = "Add film";
const categories = listGenres().map(genre=>genre.genre_name);//this will give you the list of all genres
//["Horror","Sci-Fi","Drama","Comedy","Action","Thriller","Mystery","Crime","Adventure","Fantasy","Biography","War","History","Music
You can console.log categories without map() which gives you array of object from db
I think this is great, you managed to get data from db
Good luck with handling the data from bd
The text was updated successfully, but these errors were encountered: