feat: live module and jenkins pipeline to harbor deploy

This commit is contained in:
Yvan
2026-09-21 16:45:44 +08:00
parent 451c8e2abc
commit 829d75c657
145 changed files with 8984 additions and 269 deletions
+20
View File
@@ -0,0 +1,20 @@
package handler
import (
"github.com/gin-gonic/gin"
service "kra/internal/service/analytics"
"strconv"
)
type Analytics struct{ s *service.Service }
func NewAnalytics(s *service.Service) *Analytics { return &Analytics{s: s} }
func (h *Analytics) Dashboard(c *gin.Context) {
days, _ := strconv.Atoi(c.DefaultQuery("days", "1"))
v, e := h.s.Get(c.Request.Context(), days)
if e != nil {
businessFail(c, e)
return
}
OKWithData(c, v)
}