You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
391 B

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
}))
}