Lines 161-167
sub add {
Link Here
|
161 |
$record = MARC::Record->new_from_xml( $body->{marcxml}, 'UTF-8', $flavour ); |
161 |
$record = MARC::Record->new_from_xml( $body->{marcxml}, 'UTF-8', $flavour ); |
162 |
$authtypecode = $body->{authtypecode}; |
162 |
$authtypecode = $body->{authtypecode}; |
163 |
} else { |
163 |
} else { |
164 |
$authtypecode = $c->validation->param('authority_type'); |
164 |
$authtypecode = $c->validation->param('x-authority-type'); |
165 |
if ( $c->req->headers->content_type =~ m/application\/marcxml\+xml/ ) { |
165 |
if ( $c->req->headers->content_type =~ m/application\/marcxml\+xml/ ) { |
166 |
$record = MARC::Record->new_from_xml( $body, 'UTF-8', $flavour ); |
166 |
$record = MARC::Record->new_from_xml( $body, 'UTF-8', $flavour ); |
167 |
} elsif ( $c->req->headers->content_type =~ m/application\/marc-in-json/ ) { |
167 |
} elsif ( $c->req->headers->content_type =~ m/application\/marc-in-json/ ) { |
Lines 184-190
sub add {
Link Here
|
184 |
my ($duplicateauthid,$duplicateauthvalue); |
184 |
my ($duplicateauthid,$duplicateauthvalue); |
185 |
($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode); |
185 |
($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode); |
186 |
|
186 |
|
187 |
my $confirm_not_duplicate = $c->validation->param('confirm_not_duplicate'); |
187 |
my $confirm_not_duplicate = $c->validation->param('x-confirm-not-duplicate'); |
188 |
|
188 |
|
189 |
return $c->render( |
189 |
return $c->render( |
190 |
status => 400, |
190 |
status => 400, |