管理端全部功能跑通
This commit is contained in:
@@ -16,7 +16,12 @@ func (this *DomainsCreatePopupAction) Init() {
|
||||
func (this *DomainsCreatePopupAction) RunGet(params struct {
|
||||
AppId int64
|
||||
}) {
|
||||
this.Data["app"] = pickApp(params.AppId)
|
||||
app, err := findAppMap(this.Parent(), params.AppId)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
this.Data["app"] = app
|
||||
this.Show()
|
||||
}
|
||||
|
||||
@@ -27,6 +32,13 @@ func (this *DomainsCreatePopupAction) RunPost(params struct {
|
||||
Must *actions.Must
|
||||
CSRF *actionutils.CSRF
|
||||
}) {
|
||||
params.Must.Field("domain", params.Domain).Require("please input domain")
|
||||
params.Must.Field("appId", params.AppId).Gt(0, "请选择应用")
|
||||
params.Must.Field("domain", params.Domain).Require("请输入域名")
|
||||
|
||||
err := createDomain(this.Parent(), params.AppId, params.Domain)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
this.Success()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user