replaced mock with actual post call

This commit is contained in:
bootunloader
2025-01-26 00:03:52 +02:00
parent 2d1c9f3fc1
commit 032dfc9e87
2 changed files with 5 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ const upsertData = async (
// Insert new entries in chunks
console.time("insertion time");
const chunks = chunkArray(entries, chunkSize);
// .map(async (chunk) => {
// .map(async (chunk) => {
// await surreal.insert<BookingEntry>(tableName, chunk);
// });
// for (let i = 0; i < chunks.length; i += 2) {

View File

@@ -10,7 +10,7 @@ import type {
import Fetch from "node-fetch";
import { HttpsProxyAgent } from "https-proxy-agent";
export type APIRespnose<T> = {
export type APIResponse<T> = {
code: number;
success: boolean;
message: string;
@@ -57,7 +57,7 @@ export async function postDataToApi(payload: {
data: PostDataEntry[];
users: ApiPostUserWithParent[];
}) {
const responses = [] as APIRespnose<[]>[];
const responses = [] as APIResponse<[]>[];
const responsesIds = [] as { requestId: number; bookId: string }[];
let failedResponses = 0;
let successResponses = 0;
@@ -116,7 +116,7 @@ export async function postDataToApi(payload: {
drawId,
date,
);
const res = await mockSendBatchRequest(
const res = await sendBatchRequest(
session,
dealerId,
payload.draw,
@@ -124,7 +124,7 @@ export async function postDataToApi(payload: {
message,
);
let rj:
| APIRespnose<{
| APIResponse<{
bookDtos: {
bookId: string;
requestId: number;