-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(kb): workspace id required for creation #3001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR enforces that Key Changes:
Impact: Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as CreateBaseModal
participant API as POST /api/knowledge
participant Service as createKnowledgeBase()
participant Permissions as getUserEntityPermissions()
participant DB as Database
UI->>API: POST with name, description, workspaceId (required)
API->>API: Validate schema (workspaceId required)
alt workspaceId missing
API-->>UI: 400 Error: Workspace ID is required
end
API->>Service: createKnowledgeBase(data, requestId)
Service->>Permissions: Check user permissions for workspace
alt No permission
Permissions-->>Service: null
Service-->>API: Error: No permission
API-->>UI: 500 Error
end
Permissions-->>Service: Permission granted
Service->>DB: Insert knowledge base with workspaceId
DB-->>Service: Knowledge base created
Service-->>API: Return knowledge base data
API-->>UI: 200 Success with data
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
Summary
Workspace ID should be required for KBs moving forward.
Type of Change
Testing
Tested manually
Checklist