mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-02-17 13:52:14 +01:00
## Description Fixes #5578 This PR fixes a `ClassCastException` that occurs when calling `/api/v1/general/extract-bookmarks`. The method was returning `List<Map<String, Object>>` directly, but Spring MVC was wrapping it in a `ResponseEntity`, causing a type mismatch. ## Changes - Changed return type from `List<Map<String, Object>>` to `ResponseEntity<List<Map<String, Object>>>` - Wrapped return values with `ResponseEntity.ok(...)` to match Spring MVC pattern - Removed `@ResponseBody` annotation as it is not needed with `ResponseEntity` ## Verification This fix follows the same pattern used in other similar endpoints: - `VerifyPDFController.verifyPDF()` returns `ResponseEntity<List<PDFVerificationResult>>` - `ValidateSignatureController.validateSignature()` returns `ResponseEntity<List<SignatureValidationResult>>` ## Testing The endpoint should now return a proper JSON response with the list of bookmarks instead of throwing a 500 error. --------- Co-authored-by: GitTensor Miner <miner@gittensor.io> Co-authored-by: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| build.gradle | ||