Initial sanitized code sync

This commit is contained in:
zqq61
2026-03-15 20:48:19 +08:00
commit 17ee51ba04
126 changed files with 22546 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
package handler
import (
"net/http"
"gpt-plus/internal/db"
"github.com/gin-gonic/gin"
)
func GetDashboard(c *gin.Context) {
stats, err := db.GetDashboardStats(db.GetDB())
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, stats)
}