1
0
Fork 0
forked from mirror/pixelfed

Update StatusController

This commit is contained in:
Daniel Supernault 2020-12-13 17:30:50 -07:00
parent 72272d8f09
commit a5019b8907
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 4 additions and 3 deletions

View file

@ -74,7 +74,10 @@ class StatusController extends Controller
return redirect('/login?next='.urlencode('/' . $request->path())); return redirect('/login?next='.urlencode('/' . $request->path()));
} }
$id = HashidService::decode($id); $id = HashidService::decode($id);
$status = Status::findOrFail($id); $status = Status::find($id);
if(!$status) {
return redirect('/404');
}
return redirect($status->url()); return redirect($status->url());
} }

View file

@ -115,8 +115,6 @@ class StatusDelete implements ShouldQueue
$tag->delete(); $tag->delete();
}); });
MediaTag::whereStatusId($status->id)
->get();
$status->forceDelete(); $status->forceDelete();
}); });