Append HTTP method options (#1851)

This commit is contained in:
Christophe Maudoux 2019-07-25 10:49:49 +02:00
parent 11f2d0f34a
commit 3082168617

View File

@ -50,16 +50,16 @@ sub init {
$self->addUnauthRoute( $self->addUnauthRoute(
notifications => 'notificationServer', notifications => 'notificationServer',
['POST'] ['POST']
); ) if ( $self->conf->{notificationServerPOST} // 1 );
$self->addUnauthRoute( $self->addUnauthRoute(
notifications => { '*' => 'notificationServer' }, notifications => { '*' => 'notificationServer' },
['GET'] ['GET']
); ) if ( $self->conf->{notificationServerGET} );
$self->addUnauthRoute( $self->addUnauthRoute(
notifications => notifications =>
{ ':uid' => { ':reference' => 'notificationServer' } }, { ':uid' => { ':reference' => 'notificationServer' } },
['DELETE'] ['DELETE']
); ) if ( $self->conf->{notificationServerDELETE} );
} }
# Search for configuration options # Search for configuration options
@ -152,7 +152,7 @@ sub getNotifBack {
sub notificationServer { sub notificationServer {
my ( $self, $req, @args ) = @_; my ( $self, $req, @args ) = @_;
return $self->module->notificationServer($req, @args); return $self->module->notificationServer( $req, @args );
} }
1; 1;