feat: avatar moderation — ученик загружает фото, учитель/админ подтверждает или отклоняет
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -144,6 +144,7 @@ app.use('/api/search', searchRoutes);
|
||||
app.use('/api/flashcards', flashcardRoutes);
|
||||
app.use('/api/settings', settingsRoutes);
|
||||
app.use('/api/preferences', require('./routes/preferences'));
|
||||
app.use('/api/avatar', require('./routes/avatar'));
|
||||
app.use('/api/analytics', analyticsRoutes);
|
||||
app.use('/api/live', liveRoutes);
|
||||
app.use('/api/classroom/guest', guestClassroomRoutes); // public — MUST be before /api/classroom
|
||||
@@ -273,9 +274,10 @@ function _fmtUptime(s) {
|
||||
const frontendDir = path.join(__dirname, '../../frontend');
|
||||
const jsDir = path.join(__dirname, '../../js');
|
||||
const staticCache = isProd ? { maxAge: '7d' } : { setHeaders: (res) => res.setHeader('Cache-Control', 'no-store') };
|
||||
app.use('/js', express.static(jsDir, staticCache));
|
||||
app.use('/css', express.static(path.join(frontendDir, 'css'), staticCache));
|
||||
app.use('/img', express.static(path.join(frontendDir, 'img'), staticCache));
|
||||
app.use('/js', express.static(jsDir, staticCache));
|
||||
app.use('/css', express.static(path.join(frontendDir, 'css'), staticCache));
|
||||
app.use('/img', express.static(path.join(frontendDir, 'img'), staticCache));
|
||||
app.use('/avatars', express.static(path.join(__dirname, '../../uploads/avatars'), { maxAge: '1d' }));
|
||||
|
||||
// Redirect legacy .html URLs → clean URLs (301)
|
||||
app.use((req, res, next) => {
|
||||
|
||||
Reference in New Issue
Block a user