mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			582 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			582 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package websocket
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
						|
	"github.com/iwind/TeaGo/actions"
 | 
						|
)
 | 
						|
 | 
						|
// 添加来源域
 | 
						|
type CreateOriginAction struct {
 | 
						|
	actionutils.ParentAction
 | 
						|
}
 | 
						|
 | 
						|
func (this *CreateOriginAction) Init() {
 | 
						|
	this.Nav("", "", "")
 | 
						|
}
 | 
						|
 | 
						|
func (this *CreateOriginAction) RunGet(params struct{}) {
 | 
						|
	this.Show()
 | 
						|
}
 | 
						|
 | 
						|
func (this *CreateOriginAction) RunPost(params struct {
 | 
						|
	Origin string
 | 
						|
 | 
						|
	Must *actions.Must
 | 
						|
}) {
 | 
						|
	params.Must.
 | 
						|
		Field("origin", params.Origin).
 | 
						|
		Require("请输入域名")
 | 
						|
 | 
						|
	this.Data["origin"] = params.Origin
 | 
						|
	this.Success()
 | 
						|
}
 |