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

(-)a/Koha/REST/V1/Holds.pm (-1 / +2 lines)
Lines 328-334 sub delete { Link Here
328
            );
328
            );
329
        }
329
        }
330
330
331
        $hold->cancel;
331
        my $cancellation_reason = $c->req->json;
332
        $hold->cancel({ cancellation_reason => $cancellation_reason });
332
333
333
        return $c->render_resource_deleted;
334
        return $c->render_resource_deleted;
334
    }
335
    }
(-)a/api/v1/swagger/paths/holds.yaml (+6 lines)
Lines 403-408 Link Here
403
    summary: Cancel hold
403
    summary: Cancel hold
404
    parameters:
404
    parameters:
405
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
405
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
406
      - name: body
407
        in: body
408
        description: Cancellation reason
409
        required: false
410
        schema:
411
          type: string
406
      - name: x-koha-override
412
      - name: x-koha-override
407
        in: header
413
        in: header
408
        required: false
414
        required: false
(-)a/t/db_dependent/api/v1/holds.t (-2 / +1 lines)
Lines 234-240 subtest "Test endpoints with permission" => sub { Link Here
234
      ->status_is(200)
234
      ->status_is(200)
235
      ->json_is([]);
235
      ->json_is([]);
236
236
237
    $t->delete_ok( "//$userid_3:$password@/api/v1/holds/$reserve_id2" )
237
    $t->delete_ok( "//$userid_3:$password@/api/v1/holds/$reserve_id2" => json => "Cancellation reason" )
238
      ->status_is(204, 'SWAGGER3.2.4')
238
      ->status_is(204, 'SWAGGER3.2.4')
239
      ->content_is('', 'SWAGGER3.3.4');
239
      ->content_is('', 'SWAGGER3.3.4');
240
240
241
- 

Return to bug 30660