Basic VGVzdDoxMjM=
, I'm not sure if it was for all the queries, or just for the login, but I would also like to restrict the query to my API. person to have the url of my API to be able to execute a query
.
I'm using Mysql for the bank, follow the example of one queried.
router.get("/menu", function(req, res){
let query = "SELECT * FROM ??";
let table = ["menu"];
query = mysql.format(query, table);
connection.query(query, function(err, rows){
if(err){
res.json({"Error": true, "Message": "Erro ao executar query do Mysql"});
}else{
res.json({"Error": false, "Message": "Sucesso", "Cardapio": rows});
}
})
})