Bugzilla – Attachment 115790 Details for
Bug 23857
Club holds endpoint not setting Location header
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23857: Make adding club holds set the Location header
Bug-23857-Make-adding-club-holds-set-the-Location-.patch (text/plain), 1.17 KB, created by
David Nind
on 2021-01-25 21:02:50 UTC
(
hide
)
Description:
Bug 23857: Make adding club holds set the Location header
Filename:
MIME Type:
Creator:
David Nind
Created:
2021-01-25 21:02:50 UTC
Size:
1.17 KB
patch
obsolete
>From e30fd9e390b7f8b3d10c2e400909324ceac4cc00 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 4 Jan 2021 09:59:49 -0300 >Subject: [PATCH] Bug 23857: Make adding club holds set the Location header > >This patch makes the club holds route add the Location header to the >response as specified in the API coding guidelines. > >To test: >1. Apply the regression tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/api/v1/clubs_holds.t >=> FAIL: Tests don't pass! >3. Apply this patch >4. Repeat 2 >=> SUCCESS: Tests pass! >5. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: David Nind <david@davidnind.com> >--- > Koha/REST/V1/Clubs/Holds.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/REST/V1/Clubs/Holds.pm b/Koha/REST/V1/Clubs/Holds.pm >index 78f741acd0..4fad9c3938 100644 >--- a/Koha/REST/V1/Clubs/Holds.pm >+++ b/Koha/REST/V1/Clubs/Holds.pm >@@ -121,6 +121,8 @@ sub add { > default_patron_home => $default_patron_home > }); > >+ $c->res->headers->location( $c->req->url->to_string . '/' ); >+ > return $c->render( > status => 201, > openapi => $club_hold->to_api >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23857
:
114778
|
114779
|
114782
|
114783
|
114784
|
115789
| 115790 |
115791