https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383

--- Comment #138 from Tomás Cohen Arazi (tcohen) <[email protected]> ---
Created attachment 209816
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209816&action=edit
Bug 42383: (QA follow-up) Fix the Location header of checkin actions

The /checkins/{checkin_id}/* action endpoints set the Location header
of their 201 responses to the request URL with the checkin id appended,
e.g. /api/v1/checkins/1/hold_confirmation?action_token=...1. That URI
does not exist, and it carries the action token.

This patch addresses point 6 of comment #77. Like the other action
endpoints in Koha (e.g. POST /holds/{hold_id}/suspension), the
Location header is the URI of the action performed, i.e. the request
path, e.g. /api/v1/checkins/1/hold_confirmation. The query string is
left out so the action token is not echoed. The header description in
the spec is updated accordingly.

The tests now check the header for all the action endpoints.

Test plan:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/checkins.t
=> FAIL: The Location header is wrong
2. Apply this patch
3. Run:
  k$ yarn api:bundle
  k$ restart_all
  k$ prove t/db_dependent/api/v1/checkins.t xt/api.t
=> SUCCESS: Tests pass!
4. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to