From 349dd908c3d835cb1b3dd95464eb909f88e3fc6d Mon Sep 17 00:00:00 2001 From: ddvk <36803246+ddvk@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:35:42 +0100 Subject: [PATCH] fix for #346 add dev telemetry route --- internal/app/handlers.go | 8 ++++---- internal/app/routes.go | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/app/handlers.go b/internal/app/handlers.go index 775ed351..9b7b86ea 100644 --- a/internal/app/handlers.go +++ b/internal/app/handlers.go @@ -1114,10 +1114,10 @@ func (app *App) syncReports(c *gin.Context) { } func (app *App) nullReport(c *gin.Context) { - _, err := io.ReadAll(c.Request.Body) - if err != nil { - log.Warn("could not read report data") - } + // _, err := io.ReadAll(c.Request.Body) + // if err != nil { + // log.Warn("could not read report data") + // } c.Status(http.StatusOK) } diff --git a/internal/app/routes.go b/internal/app/routes.go index 5bcad2bc..47006d43 100644 --- a/internal/app/routes.go +++ b/internal/app/routes.go @@ -77,6 +77,7 @@ func (app *App) registerRoutes(router *gin.Engine) { router.POST("/v1/reports", app.nullReport) router.POST("/v2/reports", app.nullReport) router.POST("/report/v1", app.nullReport) + router.POST("/v2/events", app.nullReport) //routes needing api authentitcation authRoutes := router.Group("/")