Skip to content
Snippets Groups Projects
Commit cdae55e7 authored by Fernando Erd's avatar Fernando Erd :ok_hand:
Browse files

Fix return pibpercapita

parent 8cac0464
No related branches found
No related tags found
2 merge requests!116Release v1.0.0,!76Fix return pibpercapita
Pipeline #
...@@ -145,6 +145,16 @@ pibpercapitaApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { ...@@ -145,6 +145,16 @@ pibpercapitaApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => {
.order('ibge_pib.ano_censo') .order('ibge_pib.ano_censo')
next(); next();
}, query, id2str.transform(false), response('pibpercapita')); }, query, id2str.transform(false), (req, res, next) => {
console.log(req.result);
req.result.forEach((i) => {
console.log(i.total);
let value = i.total;
let res = value.toString().split(".");
i.total = res[0] + "." + res[1].toString().substring(0,3) + "," + res[1].toString().substring(4,7)
console.log(i.total);
});
next();
} ,response("pibpercapita"));
module.exports = pibpercapitaApp; module.exports = pibpercapitaApp;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment