This commit is contained in:
2026-04-26 21:26:15 +08:00
parent 95bf0c3342
commit 7a7e28684c
10 changed files with 390 additions and 193 deletions
+20
View File
@@ -0,0 +1,20 @@
package api
import (
"github.com/gin-gonic/gin"
"level_go/internal/service"
"net/http"
)
type CommonHandler struct {
Service *service.CommonService
}
func (h *CommonHandler) GetTradeCalendar(c *gin.Context) {
resp, err := h.Service.GetTradeCalendar()
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, resp)
}