兼容用户节点

This commit is contained in:
刘祥超
2020-12-18 21:18:53 +08:00
parent 1b6e2819e3
commit c81deef52d
22 changed files with 288 additions and 90 deletions

View File

@@ -315,10 +315,14 @@ func (this *HTTPWebDAO) ComposeWebConfig(webId int64) (*serverconfigs.HTTPWebCon
}
// 创建Web配置
func (this *HTTPWebDAO) CreateWeb(rootJSON []byte) (int64, error) {
func (this *HTTPWebDAO) CreateWeb(adminId int64, userId int64, rootJSON []byte) (int64, error) {
op := NewHTTPWebOperator()
op.State = HTTPWebStateEnabled
op.Root = JSONBytes(rootJSON)
op.AdminId = adminId
op.UserId = userId
if len(rootJSON) > 0 {
op.Root = JSONBytes(rootJSON)
}
err := this.Save(op)
if err != nil {
return 0, err