Skip to content

Commit

Permalink
add logs (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
zdeveloper authored Oct 1, 2024
1 parent d9777b9 commit 93b0fc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ export const ImageToText = async (args: ImageToTextArgs): Promise<ImageToTextRes
});

const apiUrl = import.meta.env.VITE_API_URL || "http://localhost:8000/"
const imageToTextURL = `${apiUrl}image_to_text/`
console.log("Calling: ", imageToTextURL)
try {
const response = await fetch(`${apiUrl}image_to_text/`, {
const response = await fetch(imageToTextURL, {
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded"
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ import { SaveTemplate } from "./pages/SaveTemplate.tsx";
import ReviewTemplate from "./pages/ReviewTemplate.tsx";
import SubmissionTemplate from "./pages/SubmissionTemplate.tsx";


console.log(`API_URL: ${import.meta.env.VITE_API_URL}`)
console.log(`BASE_URL: ${import.meta.env.BASE_URL}`)

const router = createBrowserRouter([
{
path: "/",
Expand Down

0 comments on commit 93b0fc5

Please sign in to comment.