refatoração
This commit is contained in:
parent
117bdbef7b
commit
8b8406e245
28 changed files with 300 additions and 51 deletions
|
|
@ -9,16 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
};
|
||||
import { respostaComuns } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { PREFIXO, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||
import { PREFIXO, baseUrlPilao, tiposSeriesAgregacoes, } from "./_variaveis";
|
||||
//consultar compilação
|
||||
export const zp_serie_consultar = z.object({
|
||||
identificador: z.string(),
|
||||
});
|
||||
export const serie_consultar = ({ emDesenvolvimento, parametros: { identificador }, cliente: { conta, produto }, }) => {
|
||||
const dados = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
const url = new URL(`${emDesenvolvimento
|
||||
? "http://127.0.0.1:5080"
|
||||
: "https://carro-de-boi.idz.one"}${`${PREFIXO}/${tiposSeriesAgregacoes.enum.contagem}/${produto}/${conta}`}`);
|
||||
const url = new URL(`${baseUrlPilao(emDesenvolvimento)}${`${PREFIXO}/${tiposSeriesAgregacoes.enum.contagem}/${produto}/${conta}`}`);
|
||||
const resp = yield fetch(url.toString(), {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue