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 %> + +