31 lines
493 B
Go
31 lines
493 B
Go
package log
|
|
|
|
import (
|
|
"wagfarm-api/database"
|
|
|
|
"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) {
|
|
})
|
|
router.PUT("/harvest", func(c *gin.Context) {
|
|
|
|
})
|
|
router.DELELTE("/harvest", func(c *gin.Context) {
|
|
|
|
})
|
|
}
|