From 8d103251e58ff21b9f58268083ff07665dad9331 Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Wed, 10 Jul 2019 09:17:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E9=A1=B5=E9=9D=A2=E5=89=8D=E7=AB=AF=E5=88=9D?= =?UTF-8?q?=E6=AD=A5=E5=AE=8C=E6=88=90=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/admin.js | 16 ++++++++++++ views/admin_classify.ejs | 55 ++++++++++++++++++++++++++++++++++++++++ views/admin_header.ejs | 1 + views/header.ejs | 2 ++ 4 files changed, 74 insertions(+) create mode 100644 views/admin_classify.ejs diff --git a/modules/admin.js b/modules/admin.js index 1e930cb..24eebad 100644 --- a/modules/admin.js +++ b/modules/admin.js @@ -291,6 +291,22 @@ app.get('/admin/rejudge', async (req, res) => { } }); +app.get('/admin/classify', async (req, res) => { + try { + if (!res.locals.user || !res.locals.user.is_admin) throw new ErrorMessage('您没有权限进行此操作。'); + + res.render('admin_classify', { + form: {}, + count: null + }); + } catch (e) { + syzoj.log(e); + res.render('error', { + err: e + }) + } +}); + app.post('/admin/other', async (req, res) => { try { if (!res.locals.user || !res.locals.user.is_admin) throw new ErrorMessage('您没有权限进行此操作。'); diff --git a/views/admin_classify.ejs b/views/admin_classify.ejs new file mode 100644 index 0000000..bfa6f94 --- /dev/null +++ b/views/admin_classify.ejs @@ -0,0 +1,55 @@ +<% this.adminPage = 'classify'; %> +<% include admin_header %> + +