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

(-)a/Koha/REST/V1/Patrons.pm (-2 / +5 lines)
Lines 127-133 sub add { Link Here
127
127
128
        my $patron = Koha::Patron->new( _to_model($body) )->store;
128
        my $patron = Koha::Patron->new( _to_model($body) )->store;
129
129
130
        return $c->render( status => 201, openapi => $patron->to_api );
130
        $c->res->headers->location( $c->req->url->to_string . '/' . $patron->borrowernumber );
131
        return $c->render(
132
            status  => 201,
133
            openapi => $patron->to_api
134
        );
131
    }
135
    }
132
    catch {
136
    catch {
133
        unless ( blessed $_ && $_->can('rethrow') ) {
137
        unless ( blessed $_ && $_->can('rethrow') ) {
134
- 

Return to bug 23860