.
This commit is contained in:
parent
61c9609581
commit
054daeb1a8
11 changed files with 17 additions and 19 deletions
|
|
@ -10,14 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||
import node_fetch from "cross-fetch";
|
||||
import { respostaComuns } from "p-respostas";
|
||||
import { z } from "zod";
|
||||
import { PREFIXO, baseUrlPilao } from "./variaveis";
|
||||
import { PREFIXO_PILAO, baseUrlPilao } from "./variaveis";
|
||||
//enviar registros para base de dados
|
||||
export const zp_deletar_registros = z.object({
|
||||
tabela: z.string(),
|
||||
codigos: z.array(z.string()),
|
||||
});
|
||||
export const deletar_registros = ({ conta, produto, emDesenvolvimento }) => (_a) => __awaiter(void 0, [_a], void 0, function* ({ codigos, tabela, }) {
|
||||
const url = new URL(`${baseUrlPilao(emDesenvolvimento)}${PREFIXO}/${Object.keys({ deletar_registros })[0]}/${produto}/${conta}`);
|
||||
const url = new URL(`${baseUrlPilao(emDesenvolvimento)}${PREFIXO_PILAO}/${Object.keys({ deletar_registros })[0]}/${produto}/${conta}`);
|
||||
const tamanhoBlocos = 1000;
|
||||
while (codigos.length > 0) {
|
||||
const bloco = codigos.splice(0, tamanhoBlocos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue