debug app connection
This commit is contained in:
@ -68,11 +68,13 @@ func main() {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
router.POST("/location", func(c *gin.Context) {
|
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)
|
var body locativeEvent
|
||||||
if err != nil {
|
err1 := c.ShouldBindJSON(&body)
|
||||||
c.JSON(http.StatusBadRequest, gin.H { "error": err.Error() })
|
if err1 != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H { "error": err1.Error() })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user