增加对会话操作的优化提示

This commit is contained in:
dushixiang
2021-01-25 23:23:19 +08:00
parent 31f3bad243
commit ac99332453
9 changed files with 175 additions and 116 deletions

View File

@ -132,9 +132,17 @@ func FindSessionByConnectionId(connectionId string) (o Session, err error) {
return
}
func UpdateSessionById(o *Session, id string) {
func UpdateSessionById(o *Session, id string) error {
o.ID = id
global.DB.Updates(o)
return global.DB.Updates(o).Error
}
func UpdateSessionWindowSizeById(width, height int, id string) error {
session := Session{}
session.Width = width
session.Height = height
return UpdateSessionById(&session, id)
}
func DeleteSessionById(id string) {