修复单词拼写错误的问题
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/base64"
|
||||
"encoding/json"
|
||||
"next-terminal/server/constant"
|
||||
|
||||
"next-terminal/server/config"
|
||||
"next-terminal/server/env"
|
||||
@ -260,3 +261,7 @@ func (s assetService) UpdateById(id string, m echo.Map) error {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
func (s assetService) FixSshMode() error {
|
||||
return repository.AssetRepository.UpdateAttrs(context.TODO(), "ssh-mode", "naive", constant.Native)
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ func (service sessionService) WriteCloseMessage(ws *websocket.Conn, mode string,
|
||||
disconnect := guacd.NewInstruction("disconnect")
|
||||
_ = ws.WriteMessage(websocket.TextMessage, []byte(disconnect.String()))
|
||||
}
|
||||
case constant.Naive:
|
||||
case constant.Native:
|
||||
if ws != nil {
|
||||
msg := `0` + reason
|
||||
_ = ws.WriteMessage(websocket.TextMessage, []byte(msg))
|
||||
@ -354,3 +354,7 @@ func (service sessionService) Create(clientIp, assetId, mode string, user *model
|
||||
}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func (service sessionService) FixSshMode() error {
|
||||
return repository.SessionRepository.UpdateMode(context.TODO())
|
||||
}
|
||||
|
Reference in New Issue
Block a user