Consistent spacing around auth checks
This commit is contained in:
parent
28146ad909
commit
b70ba1da6f
@ -172,6 +172,7 @@ final class Anime extends BaseController {
|
||||
public function edit(string $id, $status = 'all'): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$item = $this->model->getLibraryItem($id);
|
||||
$this->setSessionRedirect();
|
||||
|
||||
@ -210,6 +211,7 @@ final class Anime extends BaseController {
|
||||
public function formUpdate(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$data = $this->request->getParsedBody();
|
||||
|
||||
// Do some minor data manipulation for
|
||||
|
@ -112,6 +112,7 @@ final class AnimeCollection extends BaseController {
|
||||
public function form($id = NULL): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$this->setSessionRedirect();
|
||||
|
||||
$action = $id === NULL ? 'Add' : 'Edit';
|
||||
@ -140,6 +141,7 @@ final class AnimeCollection extends BaseController {
|
||||
public function edit(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$data = $this->request->getParsedBody();
|
||||
if (array_key_exists('hummingbird_id', $data))
|
||||
{
|
||||
@ -166,6 +168,7 @@ final class AnimeCollection extends BaseController {
|
||||
public function add(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$data = $this->request->getParsedBody();
|
||||
if (array_key_exists('id', $data))
|
||||
{
|
||||
@ -197,6 +200,7 @@ final class AnimeCollection extends BaseController {
|
||||
public function delete(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$data = $this->request->getParsedBody();
|
||||
if ( ! array_key_exists('hummingbird_id', $data))
|
||||
{
|
||||
|
@ -112,6 +112,7 @@ final class Manga extends Controller {
|
||||
public function addForm(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$statuses = MangaReadingStatus::KITSU_TO_TITLE;
|
||||
|
||||
$this->setSessionRedirect();
|
||||
@ -135,6 +136,7 @@ final class Manga extends Controller {
|
||||
public function add(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$data = $this->request->getParsedBody();
|
||||
if ( ! array_key_exists('id', $data))
|
||||
{
|
||||
@ -175,6 +177,7 @@ final class Manga extends Controller {
|
||||
public function edit($id, $status = 'All'): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$this->setSessionRedirect();
|
||||
$item = $this->model->getLibraryItem($id);
|
||||
$title = $this->formatTitle(
|
||||
@ -214,6 +217,7 @@ final class Manga extends Controller {
|
||||
public function formUpdate(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$data = $this->request->getParsedBody();
|
||||
|
||||
// Do some minor data manipulation for
|
||||
|
@ -90,6 +90,7 @@ final class Misc extends BaseController {
|
||||
public function logout(): void
|
||||
{
|
||||
$this->checkAuth();
|
||||
|
||||
$auth = $this->container->get('auth');
|
||||
$auth->logout();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user