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) {