This commit is contained in:
Ccjcarkbla
2026-06-13 08:03:45 -04:00
parent cfcd6ae11e
commit a2c300678b
121 changed files with 8639 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
'use strict';
const express = require('express');
const { models } = require('../../core/db');
const { authenticateToken, authenticateRole } = require('../../core/auth');
const { ok } = require('../../core/respond');
const { getStorageInfo } = require('../../core/storage');
const router = express.Router();
router.prefix = 'admin';
const OWNERS = ['Owner', 'SystemAdmin'];
router.get('/storage', authenticateToken, authenticateRole(OWNERS), async (req, res, next) => {
try {
const info = await getStorageInfo();
ok(res, info);
} catch (err) { next(err); }
});
module.exports = router;