mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
	
	
		
			18 lines
		
	
	
		
			313 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			313 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package setup
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"github.com/TeaOSLab/EdgeAdmin/internal/setup"
							 | 
						||
| 
								 | 
							
									"github.com/iwind/TeaGo/actions"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								type Helper struct {
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) {
							 | 
						||
| 
								 | 
							
									if setup.IsConfigured() {
							 | 
						||
| 
								 | 
							
										actionPtr.Object().RedirectURL("/")
							 | 
						||
| 
								 | 
							
										return false
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
									return true
							 | 
						||
| 
								 | 
							
								}
							 |