debug app connection
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful

This commit is contained in:
2024-01-14 16:02:12 +01:00
parent 1b3429184a
commit 308ca8caab

View File

@ -68,11 +68,13 @@ func main() {
}()
router.POST("/location", func(c *gin.Context) {
var body locativeEvent
err, data := c.GetRawData()
log.Printf("raw: %v, %s", err, data)
err := c.ShouldBindJSON(&body)
if err != nil {
c.JSON(http.StatusBadRequest, gin.H { "error": err.Error() })
var body locativeEvent
err1 := c.ShouldBindJSON(&body)
if err1 != nil {
c.JSON(http.StatusBadRequest, gin.H { "error": err1.Error() })
return
}