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

(-)a/Koha/REST/V1/Holds.pm (-1 / +2 lines)
Lines 315-321 sub delete { Link Here
315
    }
315
    }
316
316
317
    return try {
317
    return try {
318
        $hold->cancel;
318
        my $cancellation_reason = $c->req->json;
319
        $hold->cancel({ cancellation_reason => $cancellation_reason });
319
320
320
        return $c->render(
321
        return $c->render(
321
            status  => 204,
322
            status  => 204,
(-)a/api/v1/swagger/paths/holds.yaml (-1 / +7 lines)
Lines 370-376 Link Here
370
      - holds
370
      - holds
371
    summary: Cancel hold
371
    summary: Cancel hold
372
    parameters:
372
    parameters:
373
      - $ref: "../swagger.yaml#/parameters/hold_id_pp"
373
      - $ref: ../swagger.yaml#/hold_id_pp
374
      - name: body
375
        in: body
376
        description: Cancellation reason
377
        required: false
378
        schema:
379
          type: string
374
    produces:
380
    produces:
375
      - application/json
381
      - application/json
376
    responses:
382
    responses:
(-)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