20 lines
626 B
Go
20 lines
626 B
Go
package router
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"kra/internal/server/handler"
|
|
)
|
|
|
|
func RegisterGift(public, private *gin.RouterGroup, h *handler.Gift) {
|
|
public.GET("/live/gifts", h.PublicList)
|
|
private.GET("/live/admin/gifts", h.List)
|
|
private.GET("/live/admin/gifts/:id", h.Get)
|
|
private.POST("/live/admin/gifts", h.Create)
|
|
private.PUT("/live/admin/gifts/:id", h.Update)
|
|
private.DELETE("/live/admin/gifts/:id", h.Delete)
|
|
private.PATCH("/live/admin/gifts/:id/status", h.Status)
|
|
private.PUT("/live/admin/gifts/sort", h.Sort)
|
|
private.GET("/live/admin/sends", h.Sends)
|
|
private.POST("/live/rooms/:id/gifts", h.Send)
|
|
}
|