Update wagfarm-api/routes/log/harvest.go
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user