Skip to content

feat(api): add PATCH /chat/sessions/{session_id} to rename chat sessions#552

Open
sachin-mahato25 wants to merge 1 commit into
param20h:devfrom
sachin-mahato25:feature/rename-chat-session
Open

feat(api): add PATCH /chat/sessions/{session_id} to rename chat sessions#552
sachin-mahato25 wants to merge 1 commit into
param20h:devfrom
sachin-mahato25:feature/rename-chat-session

Conversation

@sachin-mahato25

Copy link
Copy Markdown

Closes #434

Summary

Added PATCH /chat/sessions/{session_id} route to support renaming chat sessions by the authenticated user.

Changes

  • Added PATCH /chat/sessions/{session_id} endpoint in backend/app/routes/chat.py

Requirements Completed

  • ✅ Created PATCH /chat/sessions/{session_id} route
  • ✅ Updates chat session title in the database
  • ✅ Authorization check ensures only the session owner can rename it (filters by both session_id and user.id)

Testing

  • Returns 200 with updated session when valid title is provided by the owner
  • Returns 404 if session does not exist or belongs to another user

@sachin-mahato25

Copy link
Copy Markdown
Author

Hey @param20h! I've worked on this issue and opened a PR that implements the PATCH /chat/sessions/{session_id} route.

Changes made:

  • Added PATCH /chat/sessions/{session_id} endpoint in backend/app/routes/chat.py
  • Updates the session title in the database
  • Authorization check ensures only the session owner can rename it

Please review when you get a chance. Happy to make any changes if needed! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(api): Support renaming chat sessions

2 participants