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

feat: 修改短链

update: dockerfile,workflow
This commit is contained in:
2024-03-13 13:30:45 +08:00
parent 1d9de31f47
commit 14c3b97ed2
19 changed files with 609 additions and 527 deletions

View File

@@ -5,7 +5,7 @@ import (
"html/template"
"log"
"net/http"
"sub2clash/api/controller"
"sub2clash/api/handler"
"sub2clash/config"
"sub2clash/middleware"
@@ -45,22 +45,27 @@ func SetRoute(r *gin.Engine) {
)
r.GET(
"/clash", func(c *gin.Context) {
controller.SubmodHandler(c)
handler.SubmodHandler(c)
},
)
r.GET(
"/meta", func(c *gin.Context) {
controller.SubHandler(c)
handler.SubHandler(c)
},
)
r.POST(
"/short", func(c *gin.Context) {
controller.ShortLinkGenHandler(c)
handler.ShortLinkGenHandler(c)
},
)
r.GET(
"/s/:hash", func(c *gin.Context) {
controller.ShortLinkGetHandler(c)
handler.ShortLinkGetHandler(c)
},
)
r.PUT(
"/short", func(c *gin.Context) {
handler.ShortLinkUpdateHandler(c)
},
)
}