isolamento de pacote
This commit is contained in:
commit
f34b66cbe4
96 changed files with 2285 additions and 0 deletions
19
dist-import/autenticacao/_usuarios_quipo.js
Normal file
19
dist-import/autenticacao/_usuarios_quipo.js
Normal 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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue