mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-11-30 17:13:17 +00:00
24 lines
550 B
Go
24 lines
550 B
Go
package router
|
|
|
|
import (
|
|
"Gwen/global"
|
|
"Gwen/http/controller/web"
|
|
"github.com/gin-gonic/gin"
|
|
"net/http"
|
|
)
|
|
|
|
func WebInit(g *gin.Engine) {
|
|
i := &web.Index{}
|
|
g.GET("/", i.Index)
|
|
|
|
if global.Config.App.WebClient == 1 {
|
|
g.GET("/webclient-config/index.js", i.ConfigJs)
|
|
}
|
|
|
|
if global.Config.App.WebClient == 1 {
|
|
g.StaticFS("/webclient", http.Dir(global.Config.Gin.ResourcesPath+"/web"))
|
|
g.StaticFS("/webclient2", http.Dir(global.Config.Gin.ResourcesPath+"/web2"))
|
|
}
|
|
g.StaticFS("/_admin", http.Dir(global.Config.Gin.ResourcesPath+"/admin"))
|
|
}
|