Bug 36418: opac/svc/club: switch content-type to application/json

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Victor Grousset/tuxayo 2024-03-28 18:53:16 +01:00 committed by Katrin Fischer
parent 17466e99fe
commit 70abef49cd
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 2 additions and 2 deletions

View File

@ -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 } );

View File

@ -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 } );