Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jhowbhz committed Sep 23, 2023
1 parent dd69e32 commit 8639b01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/controllers/SCController.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SCController {
]).then((values) => {
res.status(200).json(values);
}).catch((error) => {
res.status(400).json(error);
res.status(400).json({ error: error, message: 'Erro ao consultar o site do DETRAN SC.' });
});
};
this.scrap = async (placa, renavam, twocaptchaapikey) => {
Expand Down
8 changes: 7 additions & 1 deletion src/controllers/SCController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ class SCController {
}

Promise.all([

this.scrap(placa, renavam, twocaptchaapikey),

]).then((values) => {

res.status(200).json(values);

}).catch((error) => {
res.status(400).json(error);

res.status(400).json({error: error, message: 'Erro ao consultar o site do DETRAN SC.'});

});

}
Expand Down

0 comments on commit 8639b01

Please sign in to comment.