Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / lib / SGN / Controller / NOAANCDC.pm
blobecb82f7819adf305cd90605e4f4d6742ab922779
2 package SGN::Controller::NOAANCDC;
4 use Moose;
5 use URI::FromHash 'uri';
6 use Data::Dumper;
8 BEGIN { extends 'Catalyst::Controller' };
10 sub noaa_ncdc_analysis :Path('/noaa_ncdc_analysis') Args(0) {
11 my $self = shift;
12 my $c = shift;
14 my $sp_person_id = $c->user() ? $c->user->get_object()->get_sp_person_id() : undef;
15 my $schema = $c->dbic_schema("Bio::Chado::Schema", undef, $sp_person_id);
16 my $user_id;
17 if ($c->user()) {
18 $user_id = $c->user->get_object()->get_sp_person_id();
20 if (!$user_id) {
21 $c->res->redirect( uri( path => '/user/login', query => { goto_url => $c->req->uri->path_query } ) );
24 $c->stash->{template} = '/breeders_toolbox/noaa_ncdc_analysis.mas';