12345678910111213141516171819202122232425262728 |
- package controller
- import (
- "github.com/gin-gonic/gin"
- "net/http"
- "sparkteam-dash/internal/http/msg"
- "sparkteam-dash/internal/http/service"
- )
- var EventLogController = &EventLog{}
- type EventLog struct {
- }
- func (c *EventLog) ReportEventLog(ctx *gin.Context) {
- req := &msg.EventLogReq{}
- err := ctx.ShouldBindJSON(req)
- if err != nil {
- ctx.JSON(http.StatusOK, &msg.EventLogResp{
- Code: 1,
- Msg: err.Error(),
- })
- return
- }
- resp := service.EventLog.ReportEventLog(ctx, req)
- ctx.JSON(http.StatusOK, resp)
- }
|