| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package admin
- import (
- "Gwen/global"
- "Gwen/http/response"
- "github.com/gin-gonic/gin"
- )
- type Rustdesk struct {
- }
- // ServerConfig RUSTDESK服务配置
- // @Tags ADMIN
- // @Summary RUSTDESK服务配置
- // @Description 服务配置,给webclient提供api-server
- // @Accept json
- // @Produce json
- // @Success 200 {object} response.Response
- // @Failure 500 {object} response.Response
- // @Router /admin/server-config [get]
- // @Security token
- func (r *Rustdesk) ServerConfig(c *gin.Context) {
- cf := &response.ServerConfigResponse{
- IdServer: global.Config.Rustdesk.IdServer,
- Key: global.Config.Rustdesk.Key,
- RelayServer: global.Config.Rustdesk.RelayServer,
- ApiServer: global.Config.Rustdesk.ApiServer,
- }
- response.Success(c, cf)
- }
- // AppConfig APP服务配置
- // @Tags ADMIN
- // @Summary APP服务配置
- // @Description APP服务配置
- // @Accept json
- // @Produce json
- // @Success 200 {object} response.Response
- // @Failure 500 {object} response.Response
- // @Router /admin/app-config [get]
- // @Security token
- func (r *Rustdesk) AppConfig(c *gin.Context) {
- response.Success(c, &gin.H{
- "web_client": global.Config.App.WebClient,
- })
- }
|