add import node_fetch from "node-fetch";
This commit is contained in:
parent
d614ba0d27
commit
5e04f26bbb
14 changed files with 87 additions and 17 deletions
|
|
@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
import node_fetch from "node-fetch";
|
||||
import { respostaComuns } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { PREFIXO, baseUrlPilao, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||
|
|
@ -17,7 +18,7 @@ export const zp_serie_consultar = z.object({
|
|||
export const serie_consultar = ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }) => {
|
||||
const dados = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const url = new URL(`${baseUrlPilao(emDesenvolvimento)}${`${PREFIXO}/${tiposSeriesAgregacoes.enum.contagem}/${produto}/${conta}`}`);
|
||||
const resp = yield fetch(url.toString(), {
|
||||
const resp = yield node_fetch(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
identificador,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue