2024-06-20 02:49:55 +00:00
|
|
|
package orders
|
|
|
|
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
|
|
|
|
func ApplyOrderRouter(router *gin.Engine) *gin.Engine {
|
|
|
|
router.GET("/orders", FindOrders)
|
2024-06-20 03:04:59 +00:00
|
|
|
router.GET("/orders/:id/cover", FindOrderCover)
|
2024-06-20 02:49:55 +00:00
|
|
|
router.POST("/orders", CreateOrder)
|
|
|
|
router.GET("/orders/:id", FindOrder)
|
|
|
|
router.PATCH("/orders/:id", UpdateOrder)
|
|
|
|
router.DELETE("/orders/:id", DeleteOrder)
|
|
|
|
return router
|
|
|
|
}
|