1 package SGN
::Controller
::AJAX
::BreedersToolbox
::Boxplotter
;
7 BEGIN { extends
'Catalyst::Controller::REST' }
10 default => 'application/json',
12 map => { 'application/json' => 'JSON' },
15 sub get_constraints
:Path
('/ajax/tools/boxplotter/get_constraints') {
18 my $sp_dataset_id = $c->req->param('dataset');
19 my $unit = $c->req->param('unit');
20 my $sp_person_id = $c->user() ?
$c->user->get_object()->get_sp_person_id() : undef;
21 my $ds = CXGN
::Dataset
->new(
22 people_schema
=> $c->dbic_schema("CXGN::People::Schema", undef, $sp_person_id),
23 schema
=> $c->dbic_schema("Bio::Chado::Schema", undef, $sp_person_id),
24 sp_dataset_id
=> $sp_dataset_id
26 if (!$c->user || $c->user->get_sp_person_id()!=$ds->sp_person_id()){
27 $c->stash->{rest
} = [];
28 $c->response->status(403);
29 print STDERR Dumper
["NOKAY"];
33 $c->stash->{rest
} = $ds->get_dataset_data();