mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-10 17:30:29 +08:00
实现websocket基本功能
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user