mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
package servers
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
 | 
						|
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/default/servers/users"
 | 
						|
	"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
 | 
						|
	"github.com/iwind/TeaGo"
 | 
						|
)
 | 
						|
 | 
						|
func init() {
 | 
						|
	TeaGo.BeforeStart(func(server *TeaGo.Server) {
 | 
						|
		server.
 | 
						|
			Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeServer)).
 | 
						|
			Helper(NewHelper()).
 | 
						|
			Prefix("/servers").
 | 
						|
			Get("", new(IndexAction)).
 | 
						|
			GetPost("/create", new(CreateAction)).
 | 
						|
			GetPost("/update", new(UpdateAction)).
 | 
						|
			Post("/fixLog", new(FixLogAction)).
 | 
						|
			Post("/nearby", new(NearbyAction)).
 | 
						|
 | 
						|
			//
 | 
						|
			GetPost("/addPortPopup", new(AddPortPopupAction)).
 | 
						|
			GetPost("/addServerNamePopup", new(AddServerNamePopupAction)).
 | 
						|
			GetPost("/addOriginPopup", new(AddOriginPopupAction)).
 | 
						|
			Get("/serverNamesPopup", new(ServerNamesPopupAction)).
 | 
						|
			Post("/status", new(StatusAction)).
 | 
						|
 | 
						|
			//
 | 
						|
			Post("/users/options", new(users.OptionsAction)).
 | 
						|
			Post("/users/plans", new(users.PlansAction)).
 | 
						|
 | 
						|
			//
 | 
						|
			EndAll()
 | 
						|
	})
 | 
						|
}
 |