-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a71351
commit 3835032
Showing
5 changed files
with
152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package LIMS2::Model::Plugin::AssemblyWellQc; | ||
|
||
use strict; | ||
use warnings FATAL => 'all'; | ||
use Moose::Role; | ||
use Hash::MoreUtils qw( slice_def ); | ||
use Try::Tiny; | ||
|
||
requires qw( schema check_params throw retrieve log trace ); | ||
|
||
=head | ||
A Catalyst plugin that provides methods for updating well_assembly_qc values | ||
=cut | ||
|
||
|
||
|
||
1; | ||
|
||
__END__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package LIMS2::WebApp::Controller::API::AssemblyQc; | ||
use Moose; | ||
use namespace::autoclean; | ||
use Try::Tiny; | ||
|
||
BEGIN {extends 'LIMS2::Catalyst::Controller::REST'; } | ||
|
||
=head1 NAME | ||
LIMS2::WebApp::Controller::API::AssemblyQc - Catalyst Controller | ||
=head1 DESCRIPTION | ||
API methods dealing with assembly well qc | ||
=cut | ||
|
||
sub update_assembly_qc_well :Path('/api/update_qc_well') :Args(0) :ActionClass('REST') { | ||
} | ||
|
||
sub update_assembly_qc_well_POST { | ||
my ( $self, $c ) = @_; | ||
|
||
$c->assert_user_roles('edit'); | ||
|
||
try{ | ||
my $qc_well = $c->model('Golgi')->txn_do( | ||
sub { | ||
shift->update_assembly_qc_well( $c->request->params ); | ||
} | ||
); | ||
$self->status_ok( $c, entity => { success => 1 } ); | ||
} | ||
catch { | ||
$c->log->error( "Error updating assembly qc well value: $_" ); | ||
$self->status_bad_request( $c, message => "Error: $_" ); | ||
}; | ||
|
||
return | ||
} | ||
|
||
sub crispr_es_qc_run : Path( '/api/crispr_es_qc_run' ) : Args(0) :ActionClass( 'REST' ) { | ||
} | ||
|
||
=head2 GET /api/crispr_es_qc_run | ||
Retrieve a crispr es qc run by id | ||
=cut | ||
|
||
sub crispr_es_qc_run_GET { | ||
my ( $self, $c ) = @_; | ||
|
||
$c->assert_user_roles('read'); | ||
|
||
my $crispr_es_qc_run = $c->model( 'Golgi' )->txn_do( | ||
sub { | ||
shift->retrieve_crispr_es_qc_run( { id => $c->request->param( 'id' ) } ); | ||
} | ||
); | ||
|
||
return $self->status_ok( $c, entity => $crispr_es_qc_run ); | ||
} | ||
|
||
=head2 POST | ||
=head1 LICENSE | ||
This library is free software. You can redistribute it and/or modify | ||
it under the same terms as Perl itself. | ||
=cut | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters