index.go 344 B

1234567891011121314151617181920212223
  1. package web
  2. import (
  3. "Gwen/global"
  4. "github.com/gin-gonic/gin"
  5. )
  6. type Index struct {
  7. }
  8. func (i *Index) Index(c *gin.Context) {
  9. c.Redirect(302, "/_admin/")
  10. }
  11. func (i *Index) ConfigJs(c *gin.Context) {
  12. apiServer := global.Config.Rustdesk.ApiServer
  13. tmp := `
  14. localStorage.setItem('api-server', "` + apiServer + `")
  15. `
  16. c.String(200, tmp)
  17. }