Change getMimeType and setMimeType to response->content_type.
This commit is contained in:
parent
e5adc07a05
commit
fd8f03a186
52 changed files with 138 additions and 175 deletions
|
|
@ -1079,7 +1079,7 @@ sub www_getTaxGroupsAsJSON {
|
|||
$group->{ isDefault } = 1 if $id eq $self->get( 'defaultGroup' );
|
||||
}
|
||||
|
||||
$self->session->http->setMimeType( 'application/json' );
|
||||
$self->session->response->content_type( 'application/json' );
|
||||
return to_json( { records => $taxGroups } );
|
||||
}
|
||||
|
||||
|
|
@ -1158,7 +1158,7 @@ sub www_getVATNumbersAsJSON {
|
|||
push @numbers, $number;
|
||||
}
|
||||
|
||||
$self->session->http->setMimeType( 'application/json' );
|
||||
$self->session->response->content_type( 'application/json' );
|
||||
return to_json( { records => \@numbers } );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -486,7 +486,7 @@ sub www_getTaxesAsJson {
|
|||
$results{'startIndex'} = $startIndex;
|
||||
$results{'sort'} = undef;
|
||||
$results{'dir'} = $sortDir;
|
||||
$session->http->setMimeType('application/json');
|
||||
$session->response->content_type('application/json');
|
||||
return JSON::to_json(\%results);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue