mirror of
https://github.com/veops/oneterm.git
synced 2025-11-03 09:40:59 +08:00
fix: publickey
This commit is contained in:
@@ -27,7 +27,7 @@ func (c *Controller) PostConfig(ctx *gin.Context) {
|
||||
}
|
||||
|
||||
cfg := &model.Config{}
|
||||
if err := ctx.BindJSON(cfg); err != nil {
|
||||
if err := ctx.ShouldBindBodyWithJSON(cfg); err != nil {
|
||||
ctx.AbortWithError(http.StatusBadRequest, &ApiError{Code: ErrInvalidArgument, Data: map[string]any{"err": err}})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -101,6 +101,8 @@ func HandleSsh(sess *gsession.Session) (err error) {
|
||||
}
|
||||
}()
|
||||
chs := sess.Chans
|
||||
sess.IdleTimout = idleTime()
|
||||
sess.IdleTk = time.NewTicker(sess.IdleTimout)
|
||||
tk, tk1s, tk1m := time.NewTicker(time.Millisecond*100), time.NewTicker(time.Second), time.NewTicker(time.Minute)
|
||||
sess.G.Go(func() error {
|
||||
return read(sess)
|
||||
|
||||
Reference in New Issue
Block a user