Answers for "Options to control prototype access"

0

Options to control prototype access

router.get('/categories', (request, response) => {

    Category.find().then((categories) => {

        response.render('./admin/categories', {categories: categories.map(category => category.toJSON())})    

        //Essa linha acima salvou o mundo, pois nao e mais permitido passar diretamente o parametro para ser acessado na view, por questoes de seguranca.

    }).catch((err) => {

        console.log("Erro listar categorias! : " + err)

    });
})
Posted by: Guest on May-11-2020

Code answers related to "Options to control prototype access"

Code answers related to "Javascript"

Browse Popular Code Answers by Language