Add database diagnostic export
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m29s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m29s
This commit is contained in:
15
backend/routes/databaseDiagnosticRoutes.js
Normal file
15
backend/routes/databaseDiagnosticRoutes.js
Normal file
@@ -0,0 +1,15 @@
|
||||
const express = require('express');
|
||||
const { verifySuperAdmin } = require('../auth');
|
||||
const { buildDatabaseDiagnostic } = require('../services/databaseDiagnosticService');
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
router.get('/admin/database-diagnostic', verifySuperAdmin, async (req, res, next) => {
|
||||
try {
|
||||
res.json(await buildDatabaseDiagnostic(req.user));
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user