https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42405
--- Comment #2 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 200148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200148&action=edit Bug 42405: Add REST API endpoints for single cover image operations This patch adds three REST API endpoints: POST /api/v1/biblios/{biblio_id}/cover_images POST /api/v1/items/{item_id}/cover_images DELETE /api/v1/cover_images/{image_id} These replace the svc/cover_images CGI script with proper REST endpoints. Upload endpoints accept an image via multipart/form-data and an optional replace query parameter. Test plan: 1. Apply patch 2. Regenerate the API bundle: $ ktd --shell k$ cd /kohadevbox/koha && yarn api:bundle 3. Run: k$ prove t/db_dependent/api/v1/cover_images_single.t => SUCCESS: Tests pass! 4. Tests cover: - Successful biblio image upload (201) - Multiple images without replace - Replace mode deletes existing images - Biblio not found (404) - Successful item image upload (201) - Item not found (404) - Delete image (204) - Delete non-existent image (404) 5. Sign off :-D Sponsored-by: ByWater Solutions -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
