package api import ( "git.aiterp.net/lucifer/new-server/app/config" "git.aiterp.net/lucifer/new-server/models" "github.com/gin-gonic/gin" ) func Events(r gin.IRoutes) { r.POST("", handler(func(c *gin.Context) (interface{}, error) { var event models.Event err := parseBody(c, &event) if err != nil { return nil, err } config.EventChannel<-event return event, nil })) }