summaryrefslogtreecommitdiff
path: root/server/handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'server/handlers.py')
-rw-r--r--server/handlers.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/handlers.py b/server/handlers.py
index 0b3dd46..5439d19 100644
--- a/server/handlers.py
+++ b/server/handlers.py
@@ -276,6 +276,13 @@ class EndProblem(CodeqService):
request.end()
+
+class GetUserStat(CodeqService):
+ def process(self, request):
+ stat = request.session.get_stat()
+ request.reply({'code': 0, 'stat': stat})
+
+
# maps actions to their handlers
incoming_handlers = {
'create_session': CreateSession(),
@@ -293,7 +300,8 @@ incoming_handlers = {
'update_settings': UpdateSettings(),
'test': Test(),
'load_problem': LoadProblem(),
- 'end_problem': EndProblem()
+ 'end_problem': EndProblem(),
+ 'user_stat': GetUserStat()
}