mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-12-18 11:17:49 +08:00
feat: 网站名称支持带端口 (#4446)
Refs https://github.com/1Panel-dev/1Panel/issues/3726
This commit is contained in:
parent
1e2c85e771
commit
437d6eb0fd
@ -179,8 +179,6 @@ func (w WebsiteService) GetWebsites() ([]response.WebsiteDTO, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error) {
|
func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error) {
|
||||||
primaryDomainArray := strings.Split(create.PrimaryDomain, ":")
|
|
||||||
primaryDomain := primaryDomainArray[0]
|
|
||||||
alias := create.Alias
|
alias := create.Alias
|
||||||
if common.ContainsChinese(alias) {
|
if common.ContainsChinese(alias) {
|
||||||
alias, err = common.PunycodeEncode(alias)
|
alias, err = common.PunycodeEncode(alias)
|
||||||
@ -214,7 +212,7 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
|
|||||||
|
|
||||||
defaultDate, _ := time.Parse(constant.DateLayout, constant.DefaultDate)
|
defaultDate, _ := time.Parse(constant.DateLayout, constant.DefaultDate)
|
||||||
website := &model.Website{
|
website := &model.Website{
|
||||||
PrimaryDomain: primaryDomain,
|
PrimaryDomain: create.PrimaryDomain,
|
||||||
Type: create.Type,
|
Type: create.Type,
|
||||||
Alias: alias,
|
Alias: alias,
|
||||||
Remark: create.Remark,
|
Remark: create.Remark,
|
||||||
|
Loading…
Reference in New Issue
Block a user