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:
15
api/route.go
15
api/route.go
@@ -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)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user