mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-08 10:30:24 +08:00
提供修改网站名称的接口
This commit is contained in:
@@ -32,6 +32,10 @@ const (
|
||||
ServerStateDisabled = 0 // 已禁用
|
||||
)
|
||||
|
||||
const (
|
||||
ModelServerNameMaxLength = 60
|
||||
)
|
||||
|
||||
type ServerDAO dbs.DAO
|
||||
|
||||
func NewServerDAO() *ServerDAO {
|
||||
@@ -2784,6 +2788,14 @@ func (this *ServerDAO) UpdateServerUserId(tx *dbs.Tx, serverId int64, userId int
|
||||
return this.NotifyUpdate(tx, serverId)
|
||||
}
|
||||
|
||||
// UpdateServerName 修改服务名
|
||||
func (this *ServerDAO) UpdateServerName(tx *dbs.Tx, serverId int64, name string) error {
|
||||
return this.Query(tx).
|
||||
Pk(serverId).
|
||||
Set("name", name).
|
||||
UpdateQuickly()
|
||||
}
|
||||
|
||||
// NotifyUpdate 同步服务所在的集群
|
||||
func (this *ServerDAO) NotifyUpdate(tx *dbs.Tx, serverId int64) error {
|
||||
// 创建任务
|
||||
|
||||
Reference in New Issue
Block a user