go-zero/example/shorturl/api/internal/handler/routes.go
2020-09-01 16:04:39 +08:00

26 lines
455 B
Go

// DO NOT EDIT, generated by goctl
package handler
import (
"net/http"
"shorturl/api/internal/svc"
"github.com/tal-tech/go-zero/rest"
)
func RegisterHandlers(engine *rest.Server, serverCtx *svc.ServiceContext) {
engine.AddRoutes([]rest.Route{
{
Method: http.MethodGet,
Path: "/shorten",
Handler: shortenHandler(serverCtx),
},
{
Method: http.MethodGet,
Path: "/expand",
Handler: expandHandler(serverCtx),
},
})
}