Initial commit

This commit is contained in:
2022-08-26 21:10:50 +02:00
parent f5b7072065
commit 2bf97a0194
21 changed files with 1339 additions and 2 deletions

View File

@ -0,0 +1,27 @@
// Code generated by goctl. DO NOT EDIT.
package handler
import (
"net/http"
"5feet11/internal/svc"
"github.com/zeromicro/go-zero/rest"
)
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
server.AddRoutes(
[]rest.Route{
{
Method: http.MethodGet,
Path: "/:snowflake",
Handler: ExpandUrlHandler(serverCtx),
},
{
Method: http.MethodPost,
Path: "/redirect",
Handler: ShortenUrlHandler(serverCtx),
},
},
)
}