ajuste de libs
This commit is contained in:
parent
caf3f59453
commit
547f693652
22 changed files with 236 additions and 306 deletions
|
|
@ -43,26 +43,24 @@ exports.usuarios_quipo_governo = void 0;
|
|||
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
||||
var p_respostas_1 = require("p-respostas");
|
||||
var _urlAutenticacao_1 = require("./_urlAutenticacao");
|
||||
var usuarios_quipo_governo = function (_a) {
|
||||
var token_produto = _a.token_produto, ambiente = _a.ambiente;
|
||||
return __awaiter(void 0, void 0, void 0, function () {
|
||||
var url, headers;
|
||||
return __generator(this, function (_b) {
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/usuarios_quipo_governo");
|
||||
if (!token_produto)
|
||||
return [2 /*return*/, p_respostas_1.respostaComuns.erro("token_produto não informado")];
|
||||
headers = {
|
||||
token: token_produto,
|
||||
};
|
||||
return [2 /*return*/, (0, cross_fetch_1.default)(url, {
|
||||
headers: headers,
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao buscar usu\u00E1rios quipo governo ".concat(e.message));
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
});
|
||||
var usuarios_quipo_governo = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
||||
var url, headers;
|
||||
var token_produto = _b.token_produto, ambiente = _b.ambiente;
|
||||
return __generator(this, function (_c) {
|
||||
url = "".concat((0, _urlAutenticacao_1.urlAutenticacao)(ambiente), "/api/usuarios_quipo_governo");
|
||||
if (!token_produto)
|
||||
return [2 /*return*/, p_respostas_1.respostaComuns.erro("token_produto não informado")];
|
||||
headers = {
|
||||
token: token_produto,
|
||||
};
|
||||
return [2 /*return*/, (0, cross_fetch_1.default)(url, {
|
||||
headers: headers,
|
||||
})
|
||||
.then(function (r) { return r.json(); })
|
||||
.catch(function (e) {
|
||||
return p_respostas_1.respostaComuns.erro("Erro ao buscar usu\u00E1rios quipo governo ".concat(e.message));
|
||||
})
|
||||
.then(function (r) { return r; })];
|
||||
});
|
||||
};
|
||||
}); };
|
||||
exports.usuarios_quipo_governo = usuarios_quipo_governo;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue