1
0
mirror of https://github.com/bestnite/sub2clash.git synced 2025-12-15 18:40:16 +00:00

feat: 增加短链生成

This commit is contained in:
2023-09-17 15:52:37 +08:00
parent 38dbea4a2a
commit 6b08b2cb86
14 changed files with 206 additions and 34 deletions

View File

@@ -30,4 +30,14 @@ func SetRoute(r *gin.Engine) {
controller.SubHandler(c)
},
)
r.POST(
"/short", func(c *gin.Context) {
controller.ShortLinkGenHandler(c)
},
)
r.GET(
"/s/:hash", func(c *gin.Context) {
controller.ShortLinkGetHandler(c)
},
)
}