Lines 370-375
sub add_item {
Link Here
|
370 |
|
370 |
|
371 |
$item->store->discard_changes; |
371 |
$item->store->discard_changes; |
372 |
|
372 |
|
|
|
373 |
my $base_url = $c->req->url->to_string; |
374 |
$base_url =~ s|/biblios/\d+||; |
375 |
$c->res->headers->location( $base_url . '/' . $item->id ); |
376 |
|
373 |
$c->render( |
377 |
$c->render( |
374 |
status => 201, |
378 |
status => 201, |
375 |
openapi => $c->objects->to_api($item), |
379 |
openapi => $c->objects->to_api($item), |
Lines 718-723
sub add {
Link Here
|
718 |
); |
722 |
); |
719 |
} |
723 |
} |
720 |
|
724 |
|
|
|
725 |
$c->res->headers->location( $c->req->url->to_string . '/' . $biblio_id ); |
726 |
|
721 |
return $c->render( |
727 |
return $c->render( |
722 |
status => 200, |
728 |
status => 200, |
723 |
openapi => { id => $biblio_id } |
729 |
openapi => { id => $biblio_id } |