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

Method updateSessionTitle

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

Source from the content-addressed store, hash-verified

371}
372
373func (s *Server) updateSessionTitle(c echo.Context) error {
374 sessionID := c.Param("id")
375 var req api.UpdateSessionTitleRequest
376 if err := c.Bind(&req); err != nil {
377 return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("invalid request body: %v", err))
378 }
379
380 if err := s.sm.UpdateSessionTitle(c.Request().Context(), sessionID, req.Title); err != nil {
381 return echo.NewHTTPError(http.StatusInternalServerError, fmt.Sprintf("failed to update session title: %v", err))
382 }
383
384 return c.JSON(http.StatusOK, api.UpdateSessionTitleResponse{
385 ID: sessionID,
386 Title: req.Title,
387 })
388}
389
390func (s *Server) deleteSession(c echo.Context) error {
391 sessionID := c.Param("id")

Callers

nothing calls this directly

Calls 2

ContextMethod · 0.80
UpdateSessionTitleMethod · 0.65

Tested by

no test coverage detected