|
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 719-724
sub add {
Link Here
|
| 719 |
); |
723 |
); |
| 720 |
} |
724 |
} |
| 721 |
|
725 |
|
|
|
726 |
$c->res->headers->location( $c->req->url->to_string . '/' . $biblio_id ); |
| 727 |
|
| 722 |
return $c->render( |
728 |
return $c->render( |
| 723 |
status => 200, |
729 |
status => 200, |
| 724 |
openapi => { id => $biblio_id } |
730 |
openapi => { id => $biblio_id } |