GetSession returns a single session with its tools.
(c *gin.Context)
| 21 | |
| 22 | // GetSession returns a single session with its tools. |
| 23 | func (h *Handler) GetSession(c *gin.Context) { |
| 24 | id := c.Param("id") |
| 25 | sess := sessions.Global().Get(id) |
| 26 | if sess == nil { |
| 27 | c.JSON(404, gin.H{"error": "session not found"}) |
| 28 | return |
| 29 | } |
| 30 | c.JSON(200, sess) |
| 31 | } |
| 32 | |
| 33 | // PostSessionExec enqueues a command for execution in a session. |
| 34 | func (h *Handler) PostSessionExec(c *gin.Context) { |
no test coverage detected