age Parley::View::JSON;
use strict;
use warnings;
use base qw( Catalyst::View::JSON );
1;
__END__
=head1 NAME
Parley::View::JSON - Catalyst View
=head1 DESCRIPTION
Catalyst JSON View.
=head1 AUT
gs;
use Parley::Version; our $VERSION = $Parley::VERSION;
use base 'Catalyst::Controller';
use JSON;
# deal with user login requests on user/login
sub login : Path('/user/login') {
my ( $self,
User Specified});
return;
}
}
sub suspend :Local {
my ($self, $c) = @_;
my ($json, $return_data, $person);
if (not $c->_authed_user->can_suspend_account) {
$return_da
>log->error($@);
}
}
# return some JSON
$json = to_json($return_data);
$c->response->body( $json );
$c->log->info( $json );
return;
}
sub suspended :Local {
my ($
rsion; our $VERSION = $Parley::VERSION;
use base 'Catalyst::Controller';
use Image::Magick;
use JSON;
use Image::Size qw( html_imgsize imgsize );
use Parley::App::Error qw( :methods );
# ~~~~~~~~~
my ($self, $c) = @_;
my ($return_data, $json);
my $fieldname = $c->request->param('fieldname');
$c->response->content_type('text/json');
$return_data->{old_value} = $c->request-
return_data->{updated} = 0;
$json = to_json($return_data);
$c->response->body( $json );
$c->log->info( $json );
return;
};
gs;
use Parley::Version; our $VERSION = $Parley::VERSION;
use base 'Catalyst::Controller';
use JSON;
use Proc::Daemon;
use Proc::PID::File;
use Parley::App::Error qw( :methods );
# there are ACL
= $person->get_columns;
push @results, \%data;
}
$c->response->body(
to_json(
{
ResultSet => {
person => \@results,
);
return;
}
sub roleSaveHandler :Local {
my ($self, $c) = @_;
my ($return_data, $json);
my ($person_id, $role_id, $value, $person);
$person_id = $c->request->param('person')
JSON::Any;
use HTML::ForumCode;
sub preview : Local {
my ($self, $c) = @_;
my $tt_forum = HTML::ForumCode->new();
my $msg_source = $c->request->param('msg_source');
$c->stash->{json
_data} = {
'formatted' =>
$tt_forum->forumcode(
$msg_source
)
};
$c->forward('View::JSON');
return;
}
1;