This commit is contained in:
Luiz Silva 2026-09-18 14:46:03 -03:00
parent bacbd6f8d3
commit 1782457de1
21 changed files with 339 additions and 1544 deletions

View file

@ -44,9 +44,7 @@ const codigoContaSite = async ({
method: "POST",
body: JSON.stringify(post),
headers: { "Content-Type": "application/json" }
}).then((r) => r.json()).catch(
(e) => import_p_respostas.respostaComuns.erro("Erro ao enviar registros", [e.message])
).then((r) => r);
}).then((r) => r.json()).catch((e) => import_p_respostas.respostaComuns.erro("Erro ao enviar registros", [e.message])).then((r) => r);
return resp;
} catch (e) {
return import_p_respostas.respostaComuns.erro(`erro ao buscar c\xF3digo do site: ${e}`);

View file

@ -49,9 +49,7 @@ const usuarios_quipo = async ({
method: "POST",
body: JSON.stringify({ inquilino }),
headers
}).then((r) => r.json()).catch(
(e) => import_p_respostas.respostaComuns.erro(`Erro ao buscar usu\xE1rios quipo governo ${e.message}`)
).then((r) => r);
}).then((r) => r.json()).catch((e) => import_p_respostas.respostaComuns.erro(`Erro ao buscar usu\xE1rios quipo governo ${e.message}`)).then((r) => r);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {

View file

@ -56,9 +56,7 @@ const usuarios_quipo_vincular = async ({
headers,
body: JSON.stringify(parametros),
method: "POST"
}).then(async (r) => await r.json()).catch(
(e) => import_p_respostas.respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`)
);
}).then(async (r) => await r.json()).catch((e) => import_p_respostas.respostaComuns.erro(`Erro ao criar vinculo de usuario ${e.message}`));
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {

View file

@ -46,14 +46,9 @@ const listarPrefeituras = async ({
const res = JSON.parse(texto);
return res;
} catch (error) {
return import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [
texto,
error
]);
return import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]);
}
}).catch(
(error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error])
);
}).catch((error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]));
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {

View file

@ -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 = {

View file

@ -60,16 +60,9 @@ const listarVinculos = async ({
const res2 = JSON.parse(texto);
return res2;
} catch (error) {
return import_p_respostas.respostaComuns.erro(
`Erro ao listar cidades: ${error.message}`,
[texto, error]
);
return import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [texto, error]);
}
}).catch(
(error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [
error
])
);
}).catch((error) => import_p_respostas.respostaComuns.erro(`Erro ao listar cidades: ${error.message}`, [error]));
})();
(0, import_p_comuns.cacheM)(
chaveCache,