You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
745 B
25 lines
745 B
2 months ago
|
const express = require('express');
|
||
|
const router = express.Router();
|
||
|
const multer = require('multer');
|
||
|
const randomSelect = require('./services/randomSelect');
|
||
|
const ranking = require('./services/ranking');
|
||
|
const classManager = require('./services/classManager');
|
||
|
const scoreManager = require('./services/scoreManager');
|
||
|
|
||
|
// 文件上传配置
|
||
|
const upload = multer({ dest: 'uploads/' });
|
||
|
|
||
|
// 路由 - 添加班级
|
||
|
router.post('/upload', upload.single('file'), classManager.addClass);
|
||
|
|
||
|
// 路由 - 随机点名
|
||
|
router.get('/random-call', randomSelect.selectStudent);
|
||
|
|
||
|
// 路由 - 获取排名
|
||
|
router.get('/ranking', ranking.getRanking);
|
||
|
|
||
|
// 路由 - 更新分数
|
||
|
router.post('/update-score', scoreManager.updateScore);
|
||
|
|
||
|
module.exports = router;
|