修复 ssh 登录事件 id 未设置的问题
This commit is contained in:
1 parent
ede5cc4f36
commit
8fc4ee2839
1 file changed
+2
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/dushixiang/pika/internal/protocol"
|
||||
"github.com/dushixiang/pika/internal/repo"
|
||||
"github.com/dushixiang/pika/internal/websocket"
|
||||
"github.com/google/uuid"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/datatypes"
|
||||
@@ -131,6 +132,7 @@ func (s *SSHLoginService) HandleEvent(ctx context.Context, agentID string, event
|
||||
|
||||
// 保存事件到数据库
|
||||
event := &models.SSHLoginEvent{
|
||||
ID: uuid.NewString(),
|
||||
AgentID: agentID,
|
||||
Username: eventData.Username,
|
||||
IP: eventData.IP,
|
||||
|
||||
Reference in new issue
Block a user