2020-12-02 23:11:43 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								package admins
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								import (
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-03 11:03:12 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									"github.com/TeaOSLab/EdgeAdmin/internal/configloaders"
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-02 23:11:43 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									"github.com/TeaOSLab/EdgeAdmin/internal/web/helpers"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									"github.com/iwind/TeaGo"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func init() {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TeaGo.BeforeStart(func(server *TeaGo.Server) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										server.
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-03 11:03:12 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											Helper(helpers.NewUserMustAuth(configloaders.AdminModuleCodeAdmin)).
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-02 23:11:43 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Data("teaMenu", "admins").
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Prefix("/admins").
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Get("", new(IndexAction)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											GetPost("/createPopup", new(CreatePopupAction)).
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-24 17:15:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											GetPost("/update", new(UpdateAction)).
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-02 23:11:43 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Post("/delete", new(DeleteAction)).
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-24 17:15:53 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											Get("/admin", new(AdminAction)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Get("/otpQrcode", new(OtpQrcodeAction)).
							 | 
						
					
						
							
								
									
										
										
										
											2020-12-02 23:11:43 +08:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											EndAll()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									})
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 |