mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			804 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			804 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package servers
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
 | 
						|
	"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)).
 | 
						|
 | 
						|
			GetPost("/addPortPopup", new(AddPortPopupAction)).
 | 
						|
			GetPost("/addServerNamePopup", new(AddServerNamePopupAction)).
 | 
						|
			GetPost("/addOriginPopup", new(AddOriginPopupAction)).
 | 
						|
			Get("/serverNamesPopup", new(ServerNamesPopupAction)).
 | 
						|
			Post("/status", new(StatusAction)).
 | 
						|
			EndAll()
 | 
						|
	})
 | 
						|
}
 |