Bugzilla – Attachment 164105 Details for
Bug 36418
Set response's content-type to application/json when needed - svc scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36418: opac/svc/club: switch content-type to application/json
Bug-36418-opacsvcclub-switch-content-type-to-appli.patch (text/plain), 1.39 KB, created by
Jonathan Druart
on 2024-03-29 07:28:39 UTC
(
hide
)
Description:
Bug 36418: opac/svc/club: switch content-type to application/json
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-03-29 07:28:39 UTC
Size:
1.39 KB
patch
obsolete
>From 4b3a966ca1baba087ded7303fbbfa02e00ad1021 Mon Sep 17 00:00:00 2001 >From: Victor Grousset/tuxayo <victor@tuxayo.net> >Date: Thu, 28 Mar 2024 18:53:16 +0100 >Subject: [PATCH] Bug 36418: opac/svc/club: switch content-type to > application/json > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > opac/svc/club/cancel_enrollment | 2 +- > opac/svc/club/enroll | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/opac/svc/club/cancel_enrollment b/opac/svc/club/cancel_enrollment >index 0b9fb5aa44e..e4f5dc5bf1a 100755 >--- a/opac/svc/club/cancel_enrollment >+++ b/opac/svc/club/cancel_enrollment >@@ -42,6 +42,6 @@ my $enrollment = Koha::Club::Enrollments->find($id); > $enrollment->cancel(); > > binmode STDOUT, ':encoding(UTF-8)'; >-print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' ); >+print $cgi->header( -type => 'application/json', -charset => 'UTF-8' ); > > print to_json( { success => $enrollment ? 1 : 0 } ); >diff --git a/opac/svc/club/enroll b/opac/svc/club/enroll >index ed19fc89b08..97449e6a858 100755 >--- a/opac/svc/club/enroll >+++ b/opac/svc/club/enroll >@@ -72,6 +72,6 @@ if ( $borrowernumber && $id ) { > } > > binmode STDOUT, ':encoding(UTF-8)'; >-print $cgi->header( -type => 'text/plain', -charset => 'UTF-8' ); >+print $cgi->header( -type => 'application/json', -charset => 'UTF-8' ); > > print to_json( { success => $enrollment ? 1 : 0 } ); >-- >2.34.1
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 36418
:
163837
|
163885
|
163922
|
163923
|
164066
|
164094
|
164095
|
164096
|
164097
|
164102
|
164103
|
164104
| 164105