update: icon

This commit is contained in:
Kerwin
2025-07-11 18:37:28 +08:00
parent b9d5a6b151
commit 2aff983d32
9 changed files with 190 additions and 40 deletions

View File

@@ -11,6 +11,9 @@ import (
// GetStats 获取基础统计信息
func GetStats(c *gin.Context) {
// 设置响应头,启用缓存
c.Header("Cache-Control", "public, max-age=60") // 1分钟缓存
// 获取数据库统计
var totalResources, totalCategories, totalTags, totalViews int64
db.DB.Model(&entity.Resource{}).Count(&totalResources)