mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2025-11-29 08:33:21 +00:00
add admin conf
This commit is contained in:
@@ -31,9 +31,14 @@ func Init(g *gin.Engine) {
|
||||
AddressBookCollectionBind(adg)
|
||||
AddressBookCollectionRuleBind(adg)
|
||||
UserTokenBind(adg)
|
||||
ConfigBind(adg)
|
||||
|
||||
//deprecated by ConfigBind
|
||||
rs := &admin.Rustdesk{}
|
||||
adg.GET("/server-config", rs.ServerConfig)
|
||||
adg.GET("/app-config", rs.AppConfig)
|
||||
//deprecated end
|
||||
|
||||
//访问静态文件
|
||||
//g.StaticFS("/upload", http.Dir(global.Config.Gin.ResourcesPath+"/upload"))
|
||||
}
|
||||
@@ -188,6 +193,13 @@ func UserTokenBind(rg *gin.RouterGroup) {
|
||||
aR.GET("/list", cont.List)
|
||||
aR.POST("/delete", cont.Delete)
|
||||
}
|
||||
func ConfigBind(rg *gin.RouterGroup) {
|
||||
aR := rg.Group("/config")
|
||||
rs := &admin.Config{}
|
||||
aR.GET("/server", rs.ServerConfig)
|
||||
aR.GET("/app", rs.AppConfig)
|
||||
aR.GET("/admin", rs.AdminConfig)
|
||||
}
|
||||
|
||||
/*
|
||||
func FileBind(rg *gin.RouterGroup) {
|
||||
|
||||
Reference in New Issue
Block a user