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:
2024-03-13 16:28:40 +08:00
parent 867da56f45
commit 1c5e17a4ab
4 changed files with 87 additions and 23 deletions

View File

@@ -53,14 +53,18 @@ func SetRoute(r *gin.Engine) {
handler.SubHandler(c)
},
)
r.POST(
"/short", func(c *gin.Context) {
handler.ShortLinkGenHandler(c)
r.GET(
"/s/:hash", func(c *gin.Context) {
handler.ShortLinkGetConfigHandler(c)
},
)
r.GET(
"/s/:hash", func(c *gin.Context) {
handler.ShortLinkGetHandler(c)
"/short", func(c *gin.Context) {
handler.ShortLinkGetUrlHandler(c)
})
r.POST(
"/short", func(c *gin.Context) {
handler.ShortLinkGenHandler(c)
},
)
r.PUT(