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

(-)a/Koha/Club/Hold.pm (-3 / +22 lines)
Lines 40-46 Represents a hold made for every member of club Link Here
40
40
41
=head1 API
41
=head1 API
42
42
43
=head2 Class Methods
43
=head2 Class methods
44
44
45
=cut
45
=cut
46
46
Lines 125-131 sub add { Link Here
125
125
126
}
126
}
127
127
128
=head3 type
128
129
=head3 to_api_mapping
130
131
This method returns the mapping for representing a Koha::Club::Hold object
132
on the API.
133
134
=cut
135
136
sub to_api_mapping {
137
    return {
138
        id        => 'club_hold_id',
139
        club_id   => 'club_id',
140
        biblio_id => 'biblio_id',
141
        item_id   => 'item_id'
142
    };
143
}
144
145
=head2 Internal methods
146
147
=head3 _type
129
148
130
=cut
149
=cut
131
150
Lines 139-142 Agustin Moyano <agustinmoyano@theke.io> Link Here
139
158
140
=cut
159
=cut
141
160
142
1;
161
1;
(-)a/Koha/REST/V1/Clubs/Holds.pm (-4 / +4 lines)
Lines 119-127 sub add { Link Here
119
            item_type => $item_type
119
            item_type => $item_type
120
        });
120
        });
121
121
122
        my $mapping = _to_api($club_hold->unblessed);
122
        return $c->render(
123
123
            status  => 201,
124
        return $c->render( status => 201, openapi => $mapping );
124
            openapi => $club_hold->to_api
125
        );
125
    }
126
    }
126
    catch {
127
    catch {
127
        if ( blessed $_ and $_->isa('Koha::Exceptions::Object') ) {
128
        if ( blessed $_ and $_->isa('Koha::Exceptions::Object') ) {
128
- 

Return to bug 23843