checkpoint date working
This commit is contained in:
@@ -9,7 +9,7 @@ export interface ExtractedData {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export default async function forwardToPythonService(
|
||||
export default async function forwardToPdfService(
|
||||
file: Express.Multer.File
|
||||
): Promise<ExtractedData> {
|
||||
const form = new FormData();
|
||||
25
apps/Backend/src/services/seleniumClient.ts
Normal file
25
apps/Backend/src/services/seleniumClient.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import axios from "axios";
|
||||
|
||||
export interface SeleniumPayload {
|
||||
claim: any;
|
||||
pdfs: {
|
||||
originalname: string;
|
||||
bufferBase64: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
export default async function forwardToSeleniumAgent(
|
||||
claimData: any,
|
||||
files: Express.Multer.File[]
|
||||
): Promise<any> {
|
||||
const payload: SeleniumPayload = {
|
||||
claim: claimData,
|
||||
pdfs: files.map(file => ({
|
||||
originalname: file.originalname,
|
||||
bufferBase64: file.buffer.toString("base64"),
|
||||
})),
|
||||
};
|
||||
|
||||
const response = await axios.post("http://localhost:5002/run", payload);
|
||||
return response.data;
|
||||
}
|
||||
Reference in New Issue
Block a user