Skip to content

Commit

Permalink
Fix(#8): Correct uploadPDF function to send pdf and not json with pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
SverreNystad committed Jan 14, 2024
1 parent de4a656 commit 3e20cf3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions frontend/src/services/uploadService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ const uploadPDF = async (file: File): Promise<Response> => {
}

const response = await axios
.post(apiRoutes.createFlashcards, {
method: "POST",
body: formData,
// Add headers if necessary (e.g., for authentication)
})
.post(apiRoutes.createFlashcards, formData)
.then((res) => {
return res;
})
Expand Down

0 comments on commit 3e20cf3

Please sign in to comment.