isolamento de pacote

This commit is contained in:
Luiz Silva 2025-07-06 18:35:12 -03:00
commit f34b66cbe4
96 changed files with 2285 additions and 0 deletions

View file

@ -0,0 +1,19 @@
import node_fetch from "cross-fetch";
import { respostaComuns } from "p-respostas";
export const usuarios_quipo = async ({ token_produto, url_api_autenticacao, inquilino, }) => {
const url = `${url_api_autenticacao}/api/usuarios__listar`;
if (!token_produto)
return respostaComuns.erro("token_produto não informado");
const headers = {
token: token_produto,
"Content-Type": "application/json",
};
return node_fetch(url, {
method: "POST",
body: JSON.stringify({ inquilino }),
headers,
})
.then((r) => r.json())
.catch((e) => respostaComuns.erro(`Erro ao buscar usuários quipo governo ${e.message}`))
.then((r) => r);
};