From 30821686179d85a94ebd9f3163565a1378c0e4cd Mon Sep 17 00:00:00 2001 From: Christophe Maudoux Date: Thu, 25 Jul 2019 10:49:49 +0200 Subject: [PATCH] Append HTTP method options (#1851) --- .../lib/Lemonldap/NG/Portal/Plugins/Notifications.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm index 84cbfed6c..df029c7ae 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/Notifications.pm @@ -50,16 +50,16 @@ sub init { $self->addUnauthRoute( notifications => 'notificationServer', ['POST'] - ); + ) if ( $self->conf->{notificationServerPOST} // 1 ); $self->addUnauthRoute( notifications => { '*' => 'notificationServer' }, ['GET'] - ); + ) if ( $self->conf->{notificationServerGET} ); $self->addUnauthRoute( notifications => { ':uid' => { ':reference' => 'notificationServer' } }, ['DELETE'] - ); + ) if ( $self->conf->{notificationServerDELETE} ); } # Search for configuration options @@ -152,7 +152,7 @@ sub getNotifBack { sub notificationServer { my ( $self, $req, @args ) = @_; - return $self->module->notificationServer($req, @args); + return $self->module->notificationServer( $req, @args ); } 1;