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

(-)a/Koha/REST/V1/Checkouts.pm (+12 lines)
Lines 189-194 sub add { Link Here
189
    my $patron_id = $body->{patron_id};
189
    my $patron_id = $body->{patron_id};
190
    my $onsite    = $body->{onsite_checkout};
190
    my $onsite    = $body->{onsite_checkout};
191
191
192
    if ( $c->stash('is_public')
193
        && !C4::Context->preference('OpacTrustedCheckout') )
194
    {
195
        return $c->render(
196
            status  => 405,
197
            openapi => {
198
                error      => 'Feature disabled',
199
                error_code => 'FEATURE_DISABLED'
200
            }
201
        );
202
    }
203
192
    return try {
204
    return try {
193
        my $item = Koha::Items->find($item_id);
205
        my $item = Koha::Items->find($item_id);
194
        unless ($item) {
206
        unless ($item) {
(-)a/api/v1/swagger/paths/public_patrons.yaml (-1 / +4 lines)
Lines 102-107 Link Here
102
        description: Cannot create checkout
102
        description: Cannot create checkout
103
        schema:
103
        schema:
104
          $ref: "../swagger.yaml#/definitions/error"
104
          $ref: "../swagger.yaml#/definitions/error"
105
      "405":
106
        description: Method not allowed
107
        schema:
108
          $ref: "../swagger.yaml#/definitions/error"
105
      "409":
109
      "409":
106
        description: Conflict in creating checkout
110
        description: Conflict in creating checkout
107
        schema:
111
        schema:
108
- 

Return to bug 30979