修复磁盘不能显示问题,ui增加仓库图标

This commit is contained in:
2025-08-24 09:45:40 +08:00
parent 4b507ab161
commit 9c673888c9
7 changed files with 601 additions and 95 deletions
+12 -1
View File
@@ -50,13 +50,24 @@ router.post('/config/reset', async (req, res) => {
// 获取仓库统计信息
router.get('/stats', async (req, res) => {
try {
const stats = await repositoryService.getStats()
const { forceRefresh } = req.query
const stats = await repositoryService.getStats(forceRefresh === 'true')
res.json(ResponseUtil.success(stats))
} catch (error) {
res.status(500).json(ResponseUtil.error(error.message))
}
})
// 清除磁盘使用情况缓存
router.post('/stats/clear-cache', async (req, res) => {
try {
const result = await repositoryService.clearDiskUsageCache()
res.json(ResponseUtil.success(result))
} catch (error) {
res.status(500).json(ResponseUtil.error(error.message))
}
})
// 获取所有作者列表
router.get('/artists', async (req, res) => {
try {