This commit is contained in:
parent
e1693ae83b
commit
9c5ba61ab5
1 changed files with 1 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue