isolamento de pacote
This commit is contained in:
commit
f34b66cbe4
96 changed files with 2285 additions and 0 deletions
19
dist-import/autenticacao/_codigoContaSite.js
Normal file
19
dist-import/autenticacao/_codigoContaSite.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { respostaComuns } from "p-respostas";
|
||||
import node_fetch from "cross-fetch";
|
||||
export const codigoContaSite = async ({ url_api_autenticacao, post, }) => {
|
||||
const url = `${url_api_autenticacao}/api/codigo_prefeitura_site`;
|
||||
try {
|
||||
const resp = await node_fetch(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify(post),
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.catch((e) => respostaComuns.erro("Erro ao enviar registros", [e.message]))
|
||||
.then((r) => r);
|
||||
return resp;
|
||||
}
|
||||
catch (e) {
|
||||
return respostaComuns.erro(`erro ao buscar código do site: ${e}`);
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue