[Backend] Bot CRUD - Bot Management with Max 3 Limit #16
Reference in New Issue
Block a user
Delete Branch "fix/issue-5"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement bot CRUD operations with the 3-bot limit per user constraint as described in issue #5.
Changes Made
Modified file:
src/backend/app/api/bots.pyImplemented the following endpoints:
GET /api/bots- List user's bots (max 3) with JWT authPOST /api/bots- Create new bot with 3-bot limit enforcement and unique name per userGET /api/bots/{id}- Get bot details with ownership validationPUT /api/bots/{id}- Update bot with ownership validation and unique name checkDELETE /api/bots/{id}- Delete bot with ownership validationPOST /api/bots/{id}/chat- Send message to bot (stores conversation)GET /api/bots/{id}/history- Get chat history with ownership validationFeatures Implemented
get_current_userdependency)Dependencies
Related Issue
Fixes #5
lgtm