Lines 40-47
Overloaded Mojolicious->startup method. It is called at application startup.
Link Here
|
40 |
sub startup { |
40 |
sub startup { |
41 |
my $self = shift; |
41 |
my $self = shift; |
42 |
|
42 |
|
43 |
$self->log( Koha::Logger->get({ interface => 'api' }) ); |
|
|
44 |
|
45 |
$self->hook( |
43 |
$self->hook( |
46 |
before_dispatch => sub { |
44 |
before_dispatch => sub { |
47 |
my $c = shift; |
45 |
my $c = shift; |
Lines 63-69
sub startup {
Link Here
|
63 |
$self->types->type( mij => 'application/marc-in-json' ); |
61 |
$self->types->type( mij => 'application/marc-in-json' ); |
64 |
$self->types->type( marc => 'application/marc' ); |
62 |
$self->types->type( marc => 'application/marc' ); |
65 |
|
63 |
|
66 |
|
|
|
67 |
my $secret_passphrase = C4::Context->config('api_secret_passphrase'); |
64 |
my $secret_passphrase = C4::Context->config('api_secret_passphrase'); |
68 |
if ($secret_passphrase) { |
65 |
if ($secret_passphrase) { |
69 |
$self->secrets([$secret_passphrase]); |
66 |
$self->secrets([$secret_passphrase]); |
70 |
- |
|
|