-
Notifications
You must be signed in to change notification settings - Fork 7
Onboarding : Unified API call #152
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
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
1 similar comment
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
backend/app/api/routes/onboarding.py
Outdated
| return { | ||
| "organization_id": organization.id, | ||
| "project_id": project.id, | ||
| "user_id": user.id, | ||
| "api_key": api_key_public.key, | ||
| } |
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.
Why not use the standard API response type?
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.
Is it common practice to include DB calls within the routes? I thought this was what the CRUD module was for. @AkhileshNegi what are your thoughts?
Summary
Target issue is #141
Explain the motivation for making this change. What existing problem does the pull request solve?
This pull request refactors the onboarding process endpoint by integrating it with the existing create_organization, create_project, create_user, and create_api_key functions from the app.crud module. Previously, obtaining an API key required interacting with multiple API endpoints, and users also needed to be superusers to access those endpoints. With this update, the process has been streamlined, allowing users to obtain an API key directly through the onboarding flow.
Additionally, the generated API key can be used for authentication once the is_superuser flag is updated from False to True in the database
This pull request introduces a new feature to the
mainbranch of theProjectTech4DevAI/ai-platformrepository, originating from thefeature/onboardingbranch. The primary focus of this update is the addition of a unified API call for user onboarding.Key changes include:
API Configuration: The
main.pyfile in thebackend/app/apidirectory has been updated to include an onboarding router, integrating the new onboarding functionalities into the existing API structure.Onboarding Endpoint: A new FastAPI endpoint has been added in the
backend/app/api/routes/onboarding.pyfile. This endpoint facilitates the onboarding process by managing the creation of organizations, projects, users, and API keys. It includes checks for existing entities and implements basic error handling. However, there are noted areas for potential improvement in terms of clarity, security, and robustness.CRUD Package Update: The
__init__.pyfile in thebackend/app/cruddirectory has been modified to expose new functionalities related to organizations, projects, and API keys. This is achieved by importing the necessary functions from their respective submodules, enhancing the CRUD operations available in the application.This pull request introduces a new feature to the
ai-platformrepository, specifically targeting the onboarding process. The changes are made in thefeature/onboardingbranch and are intended to be merged into themainbranch. The key updates include:API Configuration: The
main.pyfile in the API configuration has been updated to include a new onboarding router.Onboarding Endpoint: A new FastAPI endpoint has been added in the
onboarding.pyfile. This endpoint facilitates the onboarding process by handling the creation of organizations, projects, users, and API keys. It includes checks for existing entities and implements basic error handling. However, there are noted areas for potential improvement in terms of clarity, security, and robustness.CRUD Operations: The
__init__.pyfile in the CRUD directory has been updated to import new CRUD operations for organization, project, and API key modules.These changes aim to streamline the onboarding process by providing a unified API call, enhancing the overall functionality of the platform.
This pull request, titled "Onboarding: Unified API call," is aimed at merging changes from the
feature/onboardingbranch into themainbranch of theProjectTech4DevAI/ai-platformrepository. The specific file changes or modifications are not detailed in the provided summaries.