-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The current FlowfileHandler is a global, in-memory object, meaning all users share the same flows and all data is lost on restart. This issue tracks the work to replace it with a robust, database-driven system.
- Create DB Schema: Define new SQLAlchemy models for Flow and Node. Each model must contain a user_id foreign key that links to the User model, ensuring a clear ownership record for every piece of data.
- Implement a Service Layer: Develop a new UserFlowService class. This class will be instantiated for each API request and will contain the authenticated user's ID. All methods within this service (get_flow, create_node, etc.) must use the user_id to scope database queries, guaranteeing that a user can only access their own data.
- Refactor API Endpoints: Update all API endpoints that currently depend on the global flow_file_handler. Use FastAPI's dependency injection to provide the UserFlowService to these endpoints. This ensures that the application logic is automatically operating within the context of the correct user.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Projects
Status
No status