chore: initial import to Nexus_Edu
This commit is contained in:
26
backend/src/routes/analytics.routes.ts
Normal file
26
backend/src/routes/analytics.routes.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { Router } from 'express';
|
||||
import { authenticate } from '../middleware/auth.middleware';
|
||||
import {
|
||||
getClassPerformance,
|
||||
getStudentGrowth,
|
||||
getRadar,
|
||||
getStudentRadar,
|
||||
getScoreDistribution,
|
||||
getTeacherStats,
|
||||
getExamStats
|
||||
} from '../controllers/analytics.controller';
|
||||
|
||||
const router = Router();
|
||||
|
||||
// 所有分析接口都需要认证
|
||||
router.use(authenticate);
|
||||
|
||||
router.get('/class/performance', getClassPerformance);
|
||||
router.get('/student/growth', getStudentGrowth);
|
||||
router.get('/radar', getRadar);
|
||||
router.get('/student/radar', getStudentRadar);
|
||||
router.get('/distribution', getScoreDistribution);
|
||||
router.get('/teacher-stats', getTeacherStats);
|
||||
router.get('/exam/:id/stats', getExamStats);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user