build
This commit is contained in:
parent
0172055539
commit
d5353fdaf1
4 changed files with 10 additions and 4 deletions
|
|
@ -8,13 +8,15 @@ const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|||
const p_respostas_1 = require("p-respostas");
|
||||
const _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
const usuarios_quipo = async ({ token_produto, ambiente, tipo, }) => {
|
||||
const url = `${(0, _urlAutenticacao_1.urlAutenticacao)(ambiente)}/api/usuarios_quipo/${tipo}`;
|
||||
const url = `${(0, _urlAutenticacao_1.urlAutenticacao)(ambiente)}/api/usuarios_quipo`;
|
||||
if (!token_produto)
|
||||
return p_respostas_1.respostaComuns.erro("token_produto não informado");
|
||||
const headers = {
|
||||
token: token_produto,
|
||||
};
|
||||
return (0, cross_fetch_1.default)(url, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ tipo }),
|
||||
headers,
|
||||
})
|
||||
.then((r) => r.json())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue