Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
4 changed files with 11 additions and 0 deletions
Showing only changes of commit b70ba1da6f - Show all commits

View File

@ -172,6 +172,7 @@ final class Anime extends BaseController {
public function edit(string $id, $status = 'all'): void public function edit(string $id, $status = 'all'): void
{ {
$this->checkAuth(); $this->checkAuth();
$item = $this->model->getLibraryItem($id); $item = $this->model->getLibraryItem($id);
$this->setSessionRedirect(); $this->setSessionRedirect();
@ -210,6 +211,7 @@ final class Anime extends BaseController {
public function formUpdate(): void public function formUpdate(): void
{ {
$this->checkAuth(); $this->checkAuth();
$data = $this->request->getParsedBody(); $data = $this->request->getParsedBody();
// Do some minor data manipulation for // Do some minor data manipulation for

View File

@ -112,6 +112,7 @@ final class AnimeCollection extends BaseController {
public function form($id = NULL): void public function form($id = NULL): void
{ {
$this->checkAuth(); $this->checkAuth();
$this->setSessionRedirect(); $this->setSessionRedirect();
$action = $id === NULL ? 'Add' : 'Edit'; $action = $id === NULL ? 'Add' : 'Edit';
@ -140,6 +141,7 @@ final class AnimeCollection extends BaseController {
public function edit(): void public function edit(): void
{ {
$this->checkAuth(); $this->checkAuth();
$data = $this->request->getParsedBody(); $data = $this->request->getParsedBody();
if (array_key_exists('hummingbird_id', $data)) if (array_key_exists('hummingbird_id', $data))
{ {
@ -166,6 +168,7 @@ final class AnimeCollection extends BaseController {
public function add(): void public function add(): void
{ {
$this->checkAuth(); $this->checkAuth();
$data = $this->request->getParsedBody(); $data = $this->request->getParsedBody();
if (array_key_exists('id', $data)) if (array_key_exists('id', $data))
{ {
@ -197,6 +200,7 @@ final class AnimeCollection extends BaseController {
public function delete(): void public function delete(): void
{ {
$this->checkAuth(); $this->checkAuth();
$data = $this->request->getParsedBody(); $data = $this->request->getParsedBody();
if ( ! array_key_exists('hummingbird_id', $data)) if ( ! array_key_exists('hummingbird_id', $data))
{ {

View File

@ -112,6 +112,7 @@ final class Manga extends Controller {
public function addForm(): void public function addForm(): void
{ {
$this->checkAuth(); $this->checkAuth();
$statuses = MangaReadingStatus::KITSU_TO_TITLE; $statuses = MangaReadingStatus::KITSU_TO_TITLE;
$this->setSessionRedirect(); $this->setSessionRedirect();
@ -135,6 +136,7 @@ final class Manga extends Controller {
public function add(): void public function add(): void
{ {
$this->checkAuth(); $this->checkAuth();
$data = $this->request->getParsedBody(); $data = $this->request->getParsedBody();
if ( ! array_key_exists('id', $data)) if ( ! array_key_exists('id', $data))
{ {
@ -175,6 +177,7 @@ final class Manga extends Controller {
public function edit($id, $status = 'All'): void public function edit($id, $status = 'All'): void
{ {
$this->checkAuth(); $this->checkAuth();
$this->setSessionRedirect(); $this->setSessionRedirect();
$item = $this->model->getLibraryItem($id); $item = $this->model->getLibraryItem($id);
$title = $this->formatTitle( $title = $this->formatTitle(
@ -214,6 +217,7 @@ final class Manga extends Controller {
public function formUpdate(): void public function formUpdate(): void
{ {
$this->checkAuth(); $this->checkAuth();
$data = $this->request->getParsedBody(); $data = $this->request->getParsedBody();
// Do some minor data manipulation for // Do some minor data manipulation for

View File

@ -90,6 +90,7 @@ final class Misc extends BaseController {
public function logout(): void public function logout(): void
{ {
$this->checkAuth(); $this->checkAuth();
$auth = $this->container->get('auth'); $auth = $this->container->get('auth');
$auth->logout(); $auth->logout();