фикс статистики 9
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
dv 2026-04-15 12:01:31 +03:00
parent e1693ae83b
commit 9c5ba61ab5

View file

@ -540,8 +540,7 @@ app.get('/api/client-users', auth, (req, res) => {
res.json(result);
});
app.post('/api/admin/sync-client-users', auth, (req, res) => {
if (!req.user?.is_admin) return res.status(403).json({ error: 'forbidden' });
app.post('/api/admin/sync-client-users', auth, adminOnly, (req, res) => {
refreshService.syncClientUsers()
.then(() => {
const count = db.prepare('SELECT COUNT(*) as c FROM client_users').get();