Skip to content

Commit

Permalink
Just some export changes!
Browse files Browse the repository at this point in the history
  • Loading branch information
luccadimario committed Feb 26, 2024
1 parent cfafa56 commit b39a7bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions PyOCR/requestOcrFunctions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default async function getFromOcrEndpointCompgen(b64String) {
async function getFromOcrEndpointCompgen(b64String) {
url = "127.0.0.1:5000/ocr/compgen/"
const response = await fetch(url, {
method: "POST",
Expand All @@ -13,7 +13,7 @@ export default async function getFromOcrEndpointCompgen(b64String) {
return response.json();
}

export default async function getFromOcrEndpointHandwritten(b64String) {
async function getFromOcrEndpointHandwritten(b64String) {
url = "127.0.0.1:5000/ocr/handwritten/"
const response = await fetch(url, {
method: "POST",
Expand All @@ -28,3 +28,7 @@ export default async function getFromOcrEndpointHandwritten(b64String) {
return response.json();
}

module.exports = {
getFromOcrEndpointCompgen: getFromOcrEndpointCompgen,
getFromOcrEndpointHandwritten: getFromOcrEndpointHandwritten
}
3 changes: 2 additions & 1 deletion routes/externalRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ function startExternalRoutes(app, passport) {

/* END FILE MANAGMENT */


/* BEGIN B64 POST */


app.post('/api/ocr', authenticateToken, async (req, res) => {
if (req.body.b64 != null && req.body.handwritten == true) {
try {
Expand All @@ -319,6 +319,7 @@ function startExternalRoutes(app, passport) {
}
});

/* END B64 POST */



Expand Down

0 comments on commit b39a7bd

Please sign in to comment.