MCPcopy Index your code
hub / github.com/docker/docker-agent / updateSessionPermissions

Method updateSessionPermissions

pkg/server/server.go:359–371  ·  view source on GitHub ↗
(c echo.Context)

Source from the content-addressed store, hash-verified

357}
358
359func (s *Server) updateSessionPermissions(c echo.Context) error {
360 sessionID := c.Param("id")
361 var req api.UpdateSessionPermissionsRequest
362 if err := c.Bind(&req); err != nil {
363 return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("invalid request body: %v", err))
364 }
365
366 if err := s.sm.UpdateSessionPermissions(c.Request().Context(), sessionID, req.Permissions); err != nil {
367 return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to update session permissions: %v", err))
368 }
369
370 return c.JSON(http.StatusOK, map[string]string{"message": "session permissions updated"})
371}
372
373func (s *Server) updateSessionTitle(c echo.Context) error {
374 sessionID := c.Param("id")

Callers

nothing calls this directly

Calls 2

ContextMethod · 0.80

Tested by

no test coverage detected