|
Lines 75-82
sub get {
Link Here
|
| 75 |
my $c = shift->openapi->valid_input or return; |
75 |
my $c = shift->openapi->valid_input or return; |
| 76 |
|
76 |
|
| 77 |
return try { |
77 |
return try { |
| 78 |
my $cashup = Koha::Cash::Register::Cashups->find( |
78 |
my $cashup_id = $c->validation->param('cashup_id'); |
| 79 |
$c->validation->param('cashup_id') ); |
79 |
my $cashup = |
|
|
80 |
$c->objects->find( Koha::Cash::Register::Cashups->new, $cashup_id ); |
| 80 |
unless ($cashup) { |
81 |
unless ($cashup) { |
| 81 |
return $c->render( |
82 |
return $c->render( |
| 82 |
status => 404, |
83 |
status => 404, |
|
Lines 84-93
sub get {
Link Here
|
| 84 |
); |
85 |
); |
| 85 |
} |
86 |
} |
| 86 |
|
87 |
|
| 87 |
my $embed = $c->stash('koha.embed'); |
|
|
| 88 |
return $c->render( |
88 |
return $c->render( |
| 89 |
status => 200, |
89 |
status => 200, |
| 90 |
openapi => $cashup->to_api( { embed => $embed } ) |
90 |
openapi => $cashup |
| 91 |
); |
91 |
); |
| 92 |
} |
92 |
} |
| 93 |
catch { |
93 |
catch { |
| 94 |
- |
|
|