refactor: swap auth()->user()->id to auth()->id()

This commit is contained in:
Roardom
2023-06-22 09:49:25 +00:00
parent aef482682b
commit d19bb4f2ea
22 changed files with 32 additions and 32 deletions
+2 -2
View File
@@ -93,7 +93,7 @@ class Comment extends Component
final public function editComment(): void
{
if (auth()->user()->id == $this->comment->user_id || auth()->user()->group->is_modo) {
if (auth()->id() == $this->comment->user_id || auth()->user()->group->is_modo) {
$this->comment->update((new AntiXSS())->xss_clean($this->editState));
$this->isEditing = false;
} else {
@@ -103,7 +103,7 @@ class Comment extends Component
final public function deleteComment(): void
{
if (auth()->user()->id == $this->comment->user_id || auth()->user()->group->is_modo) {
if (auth()->id() == $this->comment->user_id || auth()->user()->group->is_modo) {
$this->comment->delete();
$this->emitUp('refresh');
} else {