From 96f2a3762f6f9f7de7950a09b4cb2550343ed633 Mon Sep 17 00:00:00 2001 From: matze Date: Thu, 10 Apr 2025 19:26:06 +0200 Subject: [PATCH] Update wagfarm-api/routes/log/harvest.go --- wagfarm-api/routes/log/harvest.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wagfarm-api/routes/log/harvest.go b/wagfarm-api/routes/log/harvest.go index 77afb44..77da0fa 100644 --- a/wagfarm-api/routes/log/harvest.go +++ b/wagfarm-api/routes/log/harvest.go @@ -6,10 +6,17 @@ import ( "github.com/gin-gonic/gin" ) +/* used columns: +name, date, plant, equipment +*/ + func RegisterHarvestRoutes(router *gin.Engine) { db := database.DB router.GET("/harvest", func(c *gin.Context) { + var harvests []models.Log + db.Find(&harvests) + c.JSON(http.StatusOK, types) }) router.POST("/harvest", func(c *gin.Context) {