feat: auto-detect podman/docker in agent, add studentId to activation response, fix download URLs

This commit is contained in:
root
2026-06-06 21:14:24 +00:00
parent a1883080d3
commit 349c8d0e2a
11 changed files with 132 additions and 20 deletions
+2 -1
View File
@@ -15,6 +15,7 @@ type WSMessage struct {
Type string `json:"type,omitempty"`
Port int `json:"port,omitempty"`
ComposeConfig string `json:"composeConfig,omitempty"`
StudentId string `json:"studentId,omitempty"`
StudentName string `json:"studentName,omitempty"`
Error string `json:"error,omitempty"`
}
@@ -84,7 +85,7 @@ func handleMessage(conn *websocket.Conn, msg WSMessage, dataDir, nodeID string)
case "activate":
// handled by UI, but server can also push activation response
if msg.StudentName != "" {
act := &Activation{Activated: true, StudentName: msg.StudentName, Code: msg.Code}
act := &Activation{Activated: true, StudentId: msg.StudentId, StudentName: msg.StudentName, Code: msg.Code}
saveActivation(dataDir, act)
log.Printf("Activated as %s", msg.StudentName)
}