adding chat features, admin features and bug fixes
This commit is contained in:
@@ -6,5 +6,6 @@ const router = Router();
|
||||
|
||||
router.get('/recent', authenticate, bookstackController.getRecent.bind(bookstackController));
|
||||
router.get('/search', authenticate, bookstackController.search.bind(bookstackController));
|
||||
router.get('/pages/:id', authenticate, bookstackController.getPage.bind(bookstackController));
|
||||
|
||||
export default router;
|
||||
|
||||
8
backend/src/routes/config.routes.ts
Normal file
8
backend/src/routes/config.routes.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Router } from 'express';
|
||||
import configController from '../controllers/config.controller';
|
||||
import { authenticate } from '../middleware/auth.middleware';
|
||||
|
||||
const router = Router();
|
||||
router.get('/external-links', authenticate, configController.getExternalLinks.bind(configController));
|
||||
|
||||
export default router;
|
||||
@@ -9,4 +9,9 @@ router.post('/connect', authenticate, nextcloudController.initiateConnect.bind(n
|
||||
router.post('/poll', authenticate, nextcloudController.pollConnect.bind(nextcloudController));
|
||||
router.delete('/connect', authenticate, nextcloudController.disconnect.bind(nextcloudController));
|
||||
|
||||
router.get('/rooms', authenticate, nextcloudController.getRooms.bind(nextcloudController));
|
||||
router.get('/rooms/:token/messages', authenticate, nextcloudController.getMessages.bind(nextcloudController));
|
||||
router.post('/rooms/:token/messages', authenticate, nextcloudController.sendMessage.bind(nextcloudController));
|
||||
router.post('/rooms/:token/read', authenticate, nextcloudController.markRoomAsRead.bind(nextcloudController));
|
||||
|
||||
export default router;
|
||||
|
||||
20
backend/src/routes/serviceMonitor.routes.ts
Normal file
20
backend/src/routes/serviceMonitor.routes.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { Router } from 'express';
|
||||
import serviceMonitorController from '../controllers/serviceMonitor.controller';
|
||||
import { authenticate } from '../middleware/auth.middleware';
|
||||
import { requirePermission } from '../middleware/rbac.middleware';
|
||||
|
||||
const router = Router();
|
||||
const auth = [authenticate, requirePermission('admin:access')] as const;
|
||||
|
||||
// Static routes first (before parameterized :id routes)
|
||||
router.get('/services/ping', ...auth, serviceMonitorController.pingAll.bind(serviceMonitorController));
|
||||
router.get('/services/status-summary', ...auth, serviceMonitorController.getStatusSummary.bind(serviceMonitorController));
|
||||
router.get('/services', ...auth, serviceMonitorController.getAll.bind(serviceMonitorController));
|
||||
router.post('/services', ...auth, serviceMonitorController.create.bind(serviceMonitorController));
|
||||
router.put('/services/:id', ...auth, serviceMonitorController.update.bind(serviceMonitorController));
|
||||
router.delete('/services/:id', ...auth, serviceMonitorController.delete.bind(serviceMonitorController));
|
||||
router.get('/system/health', ...auth, serviceMonitorController.getSystemHealth.bind(serviceMonitorController));
|
||||
router.get('/users', ...auth, serviceMonitorController.getUsers.bind(serviceMonitorController));
|
||||
router.post('/notifications/broadcast', ...auth, serviceMonitorController.broadcastNotification.bind(serviceMonitorController));
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user