.
This commit is contained in:
parent
bacbd6f8d3
commit
1782457de1
21 changed files with 339 additions and 1544 deletions
|
|
@ -36,10 +36,7 @@ var import_cross_fetch = __toESM(require("cross-fetch"));
|
|||
var import_p_respostas = require("p-respostas");
|
||||
var import_site_autenticacao = require("./utilitarios/site_autenticacao");
|
||||
const tx_usuarios__listar = "usuarios__listar";
|
||||
const listarUsuarios = async ({
|
||||
token,
|
||||
base_url_autenticacao
|
||||
}, parametros) => {
|
||||
const listarUsuarios = async ({ token, base_url_autenticacao }, parametros) => {
|
||||
const url = `${(0, import_site_autenticacao.site_autenticacao)(base_url_autenticacao)}/api/${tx_usuarios__listar}`;
|
||||
return (0, import_cross_fetch.default)(url, {
|
||||
headers: { token, "Content-Type": "application/json" },
|
||||
|
|
@ -51,14 +48,9 @@ const listarUsuarios = async ({
|
|||
const res = JSON.parse(texto);
|
||||
return res;
|
||||
} catch (error) {
|
||||
return import_p_respostas.respostaComuns.erro(
|
||||
`Erro ao listar usu\xE1rios: ${error.message}`,
|
||||
[texto, error]
|
||||
);
|
||||
return import_p_respostas.respostaComuns.erro(`Erro ao listar usu\xE1rios: ${error.message}`, [texto, error]);
|
||||
}
|
||||
}).catch(
|
||||
(error) => import_p_respostas.respostaComuns.erro(`Erro ao listar usu\xE1rios: ${error.message}`, [error])
|
||||
);
|
||||
}).catch((error) => import_p_respostas.respostaComuns.erro(`Erro ao listar usu\xE1rios: ${error.message}`, [error]));
|
||||
};
|
||||
// Annotate the CommonJS export names for ESM import in node:
|
||||
0 && (module.exports = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue