From: Brendan Hansen Date: Mon, 30 Sep 2019 18:38:04 +0000 (-0500) Subject: Small fix; users can't see problem name when not joined X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=2dedd926779f3a64402426c0a601bda70267acbd;p=codebox.git Small fix; users can't see problem name when not joined --- diff --git a/codebox/controllers/submission/list.moon b/codebox/controllers/submission/list.moon index 36f7eb1..f8103f9 100644 --- a/codebox/controllers/submission/list.moon +++ b/codebox/controllers/submission/list.moon @@ -5,13 +5,12 @@ import capture_errors, yield_error from require 'lapis.application' import Competitions, Problems from require 'models' make_controller - middleware: { 'logged_in' } + middleware: { 'logged_in', 'joined_competition' } scripts: { 'pie_chart' } get: => @navbar.selected = 2 - @competition = Competitions\find active: true @problem_ids = @competition\get_problem_ids! @problems = [Problems\find id for id in *@problem_ids]