View | Details | Raw Unified | Return to bug 16497
Collapse All | Expand All

(-)a/Koha/REST/V1/Library.pm (-1 / +40 lines)
Lines 24-29 use Scalar::Util qw( blessed ); Link Here
24
24
25
use Try::Tiny;
25
use Try::Tiny;
26
26
27
=head1 NAME
28
29
Koha::REST::V1::Library - Koha REST API for handling libraries (V1)
30
31
=head1 API
32
33
=head2 Methods
34
35
=cut
36
37
=head3 list
38
39
Controller function that handles listing Koha::Library objects
40
41
=cut
42
27
sub list {
43
sub list {
28
    my $c = shift->openapi->valid_input or return;
44
    my $c = shift->openapi->valid_input or return;
29
45
Lines 51-56 sub list { Link Here
51
    };
67
    };
52
}
68
}
53
69
70
=head3 get
71
72
Controller function that handles retrieving a single Koha::Library
73
74
=cut
75
54
sub get {
76
sub get {
55
    my $c = shift->openapi->valid_input or return;
77
    my $c = shift->openapi->valid_input or return;
56
78
Lines 64-69 sub get { Link Here
64
    return $c->render( status => 200, openapi => $library );
86
    return $c->render( status => 200, openapi => $library );
65
}
87
}
66
88
89
=head3 add
90
91
Controller function that handles adding a new Koha::Library object
92
93
=cut
94
67
sub add {
95
sub add {
68
    my $c = shift->openapi->valid_input or return;
96
    my $c = shift->openapi->valid_input or return;
69
97
Lines 89-94 sub add { Link Here
89
    };
117
    };
90
}
118
}
91
119
120
=head3 update
121
122
Controller function that handles updating a Koha::Library object
123
124
=cut
125
92
sub update {
126
sub update {
93
    my $c = shift->openapi->valid_input or return;
127
    my $c = shift->openapi->valid_input or return;
94
128
Lines 114-119 sub update { Link Here
114
    };
148
    };
115
}
149
}
116
150
151
=head3 delete
152
153
Controller function that handles deleting a Koha::Library object
154
155
=cut
156
117
sub delete {
157
sub delete {
118
    my $c = shift->openapi->valid_input or return;
158
    my $c = shift->openapi->valid_input or return;
119
159
120
- 

Return to bug 16497