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

(-)a/Koha/REST/V1/Clubs/Holds.pm (-1 / +1 lines)
Lines 132-138 sub add { Link Here
132
        if ( blessed $_ ) {
132
        if ( blessed $_ ) {
133
            if ($_->isa('Koha::Exceptions::ClubHold::NoPatrons')) {
133
            if ($_->isa('Koha::Exceptions::ClubHold::NoPatrons')) {
134
                return $c->render(
134
                return $c->render(
135
                    status  => 403,
135
                    status  => 409,
136
                    openapi => { error => $_->description }
136
                    openapi => { error => $_->description }
137
                );
137
                );
138
            }
138
            }
(-)a/api/v1/swagger/paths/clubs.json (-1 / +7 lines)
Lines 81-86 Link Here
81
                  "$ref": "../definitions.json#/error"
81
                  "$ref": "../definitions.json#/error"
82
                }
82
                }
83
              },
83
              },
84
              "409": {
85
                "description": "Hold not allowed",
86
                "schema": {
87
                  "$ref": "../definitions.json#/error"
88
                }
89
              },
84
              "500": {
90
              "500": {
85
                "description": "Internal server error",
91
                "description": "Internal server error",
86
                "schema": {
92
                "schema": {
Lines 101-104 Link Here
101
            }
107
            }
102
        }
108
        }
103
    }
109
    }
104
}
110
}
(-)a/t/db_dependent/api/v1/clubs_holds.t (-2 / +1 lines)
Lines 86-92 subtest 'add() tests' => sub { Link Here
86
        $t->post_ok( "//$userid:$password@/api/v1/clubs/"
86
        $t->post_ok( "//$userid:$password@/api/v1/clubs/"
87
              . $club_without_enrollments->id
87
              . $club_without_enrollments->id
88
              . "/holds" => json => $data )
88
              . "/holds" => json => $data )
89
          ->status_is(403)
89
          ->status_is(409)
90
          ->json_is( '/error' => "Cannot place a hold on a club without patrons." );
90
          ->json_is( '/error' => "Cannot place a hold on a club without patrons." );
91
91
92
        $t->post_ok( "//$userid:$password@/api/v1/clubs/"
92
        $t->post_ok( "//$userid:$password@/api/v1/clubs/"
93
- 

Return to bug 27330