package Messages import ( "encoding/json" "fmt" "net/http" "git.tovijaeschke.xyz/tovi/Envelope/Backend/Models" ) func CreateMessage(w http.ResponseWriter, r *http.Request) { var ( message Models.Message err error ) err = json.NewDecoder(r.Body).Decode(&message) if err != nil { return } fmt.Println(message) }