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

(-)a/C4/Context.pm (-1 / +2 lines)
Lines 1028-1034 sub interface { Link Here
1028
1028
1029
    if (defined $interface) {
1029
    if (defined $interface) {
1030
        $interface = lc $interface;
1030
        $interface = lc $interface;
1031
        if ($interface eq 'opac' || $interface eq 'intranet' || $interface eq 'sip' || $interface eq 'commandline') {
1031
        if ($interface eq 'opac' || $interface eq 'intranet' || $interface eq 'sip' ||
1032
            $interface eq 'commandline' || $interface eq 'rest' ) {
1032
            $context->{interface} = $interface;
1033
            $context->{interface} = $interface;
1033
        } else {
1034
        } else {
1034
            warn "invalid interface : '$interface'";
1035
            warn "invalid interface : '$interface'";
(-)a/Koha/REST/V1.pm (+2 lines)
Lines 39-44 Overloaded Mojolicious->startup method. It is called at application startup. Link Here
39
sub startup {
39
sub startup {
40
    my $self = shift;
40
    my $self = shift;
41
41
42
    C4::Context->interface('rest');
43
42
    # Remove /api/v1/app.pl/ from the path
44
    # Remove /api/v1/app.pl/ from the path
43
    $self->hook( before_dispatch => sub {
45
    $self->hook( before_dispatch => sub {
44
        shift->req->url->base->path('/');
46
        shift->req->url->base->path('/');
(-)a/etc/log4perl.conf (-1 / +10 lines)
Lines 11-13 log4perl.appender.OPAC.filename=__LOG_DIR__/opac-error.log Link Here
11
log4perl.appender.OPAC.mode=append
11
log4perl.appender.OPAC.mode=append
12
log4perl.appender.OPAC.layout=PatternLayout
12
log4perl.appender.OPAC.layout=PatternLayout
13
log4perl.appender.OPAC.layout.ConversionPattern=[%d] [%p] %m %l %n
13
log4perl.appender.OPAC.layout.ConversionPattern=[%d] [%p] %m %l %n
14
- 
14
15
log4perl.logger.rest = WARN, REST
16
log4perl.appender.REST=Log::Log4perl::Appender::File
17
log4perl.appender.REST.filename=__LOG_DIR__/rest.log
18
log4perl.appender.REST.create_at_logtime=true
19
log4perl.appender.REST.syswrite=true
20
log4perl.appender.REST.recreate=true
21
log4perl.appender.REST.mode=append
22
log4perl.appender.REST.layout=PatternLayout
23
log4perl.appender.REST.layout.ConversionPattern=[%d] [%p] %m %l %n

Return to bug 18205