Commit 4a18a3f5 authored by Yadd's avatar Yadd

Set default values for request (#595)

parent bdace915
......@@ -19,7 +19,7 @@
package Lemonldap::NG::Portal::Main::Request;
# Developpers, be careful: new() is never called so default values will not be
# taken in account (see Portal::Run::handler())
# taken in account (see Portal::Run::handler()): set default values in init()
use strict;
use Mouse;
......@@ -103,6 +103,12 @@ sub error_type {
#TODO
}
sub init {
my ($self) = @_;
$self->{$_} = {} foreach(qw(datas customParameters));;
$self->{$_} = [] foreach(qw(respCookies));;
}
sub errorString {
#TODO
......
......@@ -33,6 +33,7 @@ sub sessionDatas {
sub handler {
my ( $self, $req ) = @_;
bless $req, 'Lemonldap::NG::Portal::Main::Request';
$req->init();
return $self->Lemonldap::NG::Common::PSGI::Router::handler($req);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment