Staging (#2927)
* Created localized exception.php (DE) * Update German translation * Update German translation * Update de localization, Create New Post -> New * Formatting * Update site.php (#2889) Co-authored-by: daniel <danielsupernault@gmail.com> * Formatting * Update controllers, fixes #2906 * Update NotificationService, fix 500 bug * Update changelog Co-authored-by: forenta <ueblesurmeli-github@yahoo.de> Co-authored-by: Tomas Brabenec <tomas@brabenec.net>
This commit is contained in:
parent
cdfb6ac25f
commit
68437e614d
10 changed files with 57 additions and 28 deletions
|
@ -11,14 +11,10 @@ use App\Services\FollowerService;
|
|||
|
||||
class PollController extends Controller
|
||||
{
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||
}
|
||||
|
||||
public function getPoll(Request $request, $id)
|
||||
{
|
||||
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||
|
||||
$poll = Poll::findOrFail($id);
|
||||
$status = Status::findOrFail($poll->status_id);
|
||||
if($status->scope != 'public') {
|
||||
|
@ -34,6 +30,8 @@ class PollController extends Controller
|
|||
|
||||
public function vote(Request $request, $id)
|
||||
{
|
||||
abort_if(!config_cache('instance.polls.enabled'), 404);
|
||||
|
||||
abort_unless($request->user(), 403);
|
||||
|
||||
$this->validate($request, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue