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:
Jesse Weaver 2017-10-06 13:20:01 -06:00 committed by Martin Renvoize
parent f2dfa17f0e
commit 18570614c4
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 7 additions and 4 deletions

View file

@ -24,9 +24,12 @@ use Koha::CirculationRules;
use Try::Tiny; use Try::Tiny;
sub get_kinds { 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;

View file

@ -1,8 +1,8 @@
{ {
"/circulation-rules/kinds": { "/circulation-rules/kinds": {
"get": { "get": {
"x-mojo-controller": "Koha::REST::V1::CirculationRules", "x-mojo-to": "CirculationRules#get_kinds",
"operationId": "get_kinds", "operationId": "getCirculationRuleKinds",
"tags": ["cities"], "tags": ["cities"],
"produces": [ "produces": [
"application/json" "application/json"