diff options
Diffstat (limited to 'server/handlers.py')
-rw-r--r-- | server/handlers.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/handlers.py b/server/handlers.py index 0cc474f..52a33f5 100644 --- a/server/handlers.py +++ b/server/handlers.py @@ -21,7 +21,12 @@ class ProblemList(CodeqService): session_is_optional = True def process(self, request): - request.reply({'code': 0, 'message': 'ok', 'problems': server.problems.list_problems()}) + js = request.data + language = js.get('language') + if language is None: + request.reply({'code': 1, 'message': 'Language was not provided'}) + else: + request.reply({'code': 0, 'message': 'ok', 'problems': server.problems.list_problems(language)}) class Login(CodeqService): |