Bug 18936: (follow-up) Update REST definition for /.../kinds
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
f2dfa17f0e
commit
18570614c4
2 changed files with 7 additions and 4 deletions
|
@ -24,9 +24,12 @@ use Koha::CirculationRules;
|
|||
use Try::Tiny;
|
||||
|
||||
sub get_kinds {
|
||||
my ( $c, $args, $cb ) = @_;
|
||||
my $c = shift->openapi->valid_input or return;
|
||||
|
||||
return $c->$cb( Koha::CirculationRules->rule_kinds, 200 );
|
||||
return $c->render(
|
||||
status => 200,
|
||||
openapi => Koha::CirculationRules->rule_kinds,
|
||||
);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"/circulation-rules/kinds": {
|
||||
"get": {
|
||||
"x-mojo-controller": "Koha::REST::V1::CirculationRules",
|
||||
"operationId": "get_kinds",
|
||||
"x-mojo-to": "CirculationRules#get_kinds",
|
||||
"operationId": "getCirculationRuleKinds",
|
||||
"tags": ["cities"],
|
||||
"produces": [
|
||||
"application/json"
|
||||
|
|
Loading…
Reference in a new issue