1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

re-working validation

This commit is contained in:
David Bomba 2016-03-13 23:27:20 +11:00
parent d7b6426aee
commit c79509d04f

View File

@ -15,6 +15,11 @@ class RegisterRequest extends Request
* @return bool
*/
public function __construct(\Illuminate\Http\Request $request)
{
$this->request = $request;
}
public function authorize()
{
return true;
@ -39,9 +44,8 @@ class RegisterRequest extends Request
public function response(array $errors)
{
$request = $this->getRequest();
if(!isset($request->api_secret))
if(!isset($this->request->api_secret))
return parent::response($errors);
Log::info($errors);
@ -62,8 +66,4 @@ class RegisterRequest extends Request
}
}
public function getRequest(\Illuminate\Http\Request $request)
{
return $request;
}
}