mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-11-29 08:33:21 +00:00
add login fail warn &
add web client on/off & up admin peer filter & upgrade web client
This commit is contained in:
@@ -47,17 +47,11 @@ func ApiInit(g *gin.Engine) {
|
||||
frg.POST("/sysinfo", pe.SysInfo)
|
||||
}
|
||||
|
||||
{
|
||||
w := &api.WebClient{}
|
||||
frg.POST("/shared-peer", w.SharedPeer)
|
||||
if global.Config.App.WebClient == 1 {
|
||||
WebClientRoutes(frg)
|
||||
}
|
||||
|
||||
frg.Use(middleware.RustAuth())
|
||||
{
|
||||
w := &api.WebClient{}
|
||||
frg.POST("/server-config", w.ServerConfig)
|
||||
}
|
||||
|
||||
{
|
||||
u := &api.User{}
|
||||
frg.GET("/user/info", u.Info)
|
||||
@@ -115,3 +109,14 @@ func PersonalRoutes(frg *gin.RouterGroup) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func WebClientRoutes(frg *gin.RouterGroup) {
|
||||
w := &api.WebClient{}
|
||||
{
|
||||
frg.POST("/shared-peer", w.SharedPeer)
|
||||
}
|
||||
{
|
||||
frg.POST("/server-config", middleware.RustAuth(), w.ServerConfig)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user