18 lines
594 B
Go
18 lines
594 B
Go
package router
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"kra/internal/server/handler"
|
|
)
|
|
|
|
func RegisterRecharge(public, private *gin.RouterGroup, h *handler.Recharge) {
|
|
public.GET("/live/recharge/providers", h.Providers)
|
|
public.GET("/live/recharge/plans", h.Plans)
|
|
private.GET("/live/recharge/orders/:orderNo", h.GetMine)
|
|
private.GET("/live/recharge/orders/:orderNo/status", h.PaymentStatus)
|
|
private.PUT("/live/admin/recharge/plans", h.SavePlans)
|
|
private.GET("/live/admin/orders", h.List)
|
|
private.GET("/live/admin/orders/:orderNo", h.Get)
|
|
private.POST("/live/recharge/orders", h.Create)
|
|
}
|