feat: auto-detect podman/docker in agent, add studentId to activation response, fix download URLs
This commit is contained in:
+2
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user