fixed api token

This commit is contained in:
denisdulici
2017-11-02 02:00:54 +03:00
parent d67b5e7746
commit dfac921e97
6 changed files with 52 additions and 47 deletions

View File

@ -57,4 +57,18 @@ class Controller extends BaseController
return $counter;
}
/**
* Check for api token and redirect if empty.
*
* @return mixed
*/
public function checkApiToken()
{
if (setting('general.api_token')) {
return;
}
redirect('apps/token/create')->send();
}
}