Skip to content
Snippets Groups Projects
Commit 2c771a44 authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Merge branch 'fix_return_pib' into development

Related: !76
parents 6acc1b29 e9630eb2
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
...@@ -152,6 +152,14 @@ pibpercapitaApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { ...@@ -152,6 +152,14 @@ 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) => {
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)
});
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