mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
!auth()->check()
This commit is contained in:
@@ -41,7 +41,7 @@ class OrangePillForm extends Component
|
||||
|
||||
public function mount()
|
||||
{
|
||||
if (! $this->orangePill) {
|
||||
if (!$this->orangePill) {
|
||||
$this->orangePill = new OrangePill([
|
||||
'user_id' => auth()->id(),
|
||||
'book_case_id' => $this->bookCase->id,
|
||||
@@ -58,6 +58,9 @@ class OrangePillForm extends Component
|
||||
|
||||
public function save()
|
||||
{
|
||||
if (!auth()->check()) {
|
||||
return to_route('auth.ln');
|
||||
}
|
||||
$this->validate();
|
||||
$this->orangePill->save();
|
||||
|
||||
@@ -74,7 +77,9 @@ class OrangePillForm extends Component
|
||||
public function deleteMe()
|
||||
{
|
||||
$this->orangePill->delete();
|
||||
auth()->user()->undoPoint(new BookCaseOrangePilled(auth()->user()));
|
||||
auth()
|
||||
->user()
|
||||
->undoPoint(new BookCaseOrangePilled(auth()->user()));
|
||||
|
||||
return redirect($this->fromUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user