(c echo.Context)
| 357 | } |
| 358 | |
| 359 | func (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 | |
| 373 | func (s *Server) updateSessionTitle(c echo.Context) error { |
| 374 | sessionID := c.Param("id") |
nothing calls this directly
no test coverage detected