From 8da54c17b12392117fc316aee6d6e10b4fe58518 Mon Sep 17 00:00:00 2001 From: tobiichi3227 <86729076+tobiichi3227@users.noreply.github.com> Date: Fri, 24 May 2024 09:48:59 +0800 Subject: [PATCH] chore: code cleanup (#64) --- src/handlers/api.py | 4 ---- src/handlers/pro.py | 4 ---- src/static/index.js | 4 ++-- src/static/templ/rank.html | 35 ++++++++--------------------------- 4 files changed, 10 insertions(+), 37 deletions(-) diff --git a/src/handlers/api.py b/src/handlers/api.py index 4fd6d9a0..f346bc68 100644 --- a/src/handlers/api.py +++ b/src/handlers/api.py @@ -7,10 +7,6 @@ class ApiHandler(RequestHandler): - @reqenv - async def get(self): - pass - @reqenv async def post(self): reqtype = str(self.get_argument('reqtype')) diff --git a/src/handlers/pro.py b/src/handlers/pro.py index b8799ede..80395b9a 100644 --- a/src/handlers/pro.py +++ b/src/handlers/pro.py @@ -138,10 +138,6 @@ async def get(self): isadmin=self.acct.is_kernel(), ) - @reqenv - async def post(self): - pass - class ProStaticHandler(RequestHandler): @reqenv diff --git a/src/static/index.js b/src/static/index.js index 4eebbc46..3bd96eaf 100644 --- a/src/static/index.js +++ b/src/static/index.js @@ -122,7 +122,7 @@ var index = new function() { $(document).on('keypress', 'input', function(e) { let idx; - var j_next; + let j_next; if (e.which == 13) { idx = parseInt($(this).attr('tabindex')); @@ -172,7 +172,7 @@ var index = new function() { }; $.fn.print = function(msg, succ) { - var j_e = this; + let j_e = this; j_e.text(msg); diff --git a/src/static/templ/rank.html b/src/static/templ/rank.html index 92024ea9..8426d550 100644 --- a/src/static/templ/rank.html +++ b/src/static/templ/rank.html @@ -24,7 +24,7 @@
@@ -45,36 +45,18 @@