Files
gongxue-base/apps/api/src/features/learning/index.ts
2026-06-29 15:19:35 +08:00

51 lines
2.2 KiB
TypeScript

import type { RouteDefinition } from '../../core/router.js';
import { learningLeaderboardRoute } from './leaderboard.js';
import {
createPracticeSessionRoute,
favoriteQuestionsRoute,
favoriteWordsRoute,
learningStatsRoute,
learningTrendRoute,
practiceSessionDetailRoute,
practiceReportsRoute,
practiceHistoryRoute,
practiceSessionReportRoute,
resolveWrongQuestionRoute,
submitAnswerRoute,
submitPracticeSessionRoute,
toggleFavoriteQuestionRoute,
toggleFavoriteWordRoute,
reviewWordRoute,
updateWordProgressRoute,
wordProgressRoute,
wordReviewPlanRoute,
wordStatsRoute,
wrongQuestionReviewPlanRoute,
wrongQuestionsRoute,
} from './routes.js';
export const learningRoutes: RouteDefinition[] = [
['GET', '/api/learning/leaderboard', learningLeaderboardRoute],
['POST', '/api/learning/practice-sessions', createPracticeSessionRoute],
['GET', '/api/learning/practice-sessions/detail', practiceSessionDetailRoute],
['POST', '/api/learning/practice-sessions/submit', submitPracticeSessionRoute],
['GET', '/api/learning/practice-sessions/report', practiceSessionReportRoute],
['GET', '/api/learning/practice-sessions/history', practiceHistoryRoute],
['GET', '/api/learning/practice-reports', practiceReportsRoute],
['GET', '/api/learning/stats', learningStatsRoute],
['GET', '/api/learning/trend', learningTrendRoute],
['POST', '/api/learning/answers', submitAnswerRoute],
['GET', '/api/learning/favorites/questions', favoriteQuestionsRoute],
['POST', '/api/learning/favorites/questions', toggleFavoriteQuestionRoute],
['GET', '/api/learning/wrong-questions', wrongQuestionsRoute],
['GET', '/api/learning/wrong-questions/review-plan', wrongQuestionReviewPlanRoute],
['POST', '/api/learning/wrong-questions/resolve', resolveWrongQuestionRoute],
['GET', '/api/learning/vocabulary/progress', wordProgressRoute],
['POST', '/api/learning/vocabulary/progress', updateWordProgressRoute],
['GET', '/api/learning/vocabulary/review-plan', wordReviewPlanRoute],
['POST', '/api/learning/vocabulary/review', reviewWordRoute],
['GET', '/api/learning/vocabulary/favorites', favoriteWordsRoute],
['POST', '/api/learning/vocabulary/favorites', toggleFavoriteWordRoute],
['GET', '/api/learning/vocabulary/stats', wordStatsRoute],
];