-
Notifications
You must be signed in to change notification settings - Fork 182
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
Add create_user endpoint #658
Add create_user endpoint #658
Conversation
@Oluwatos94 fix pylint issue |
margin_app/app/api/user.py
Outdated
|
||
router = APIRouter() | ||
|
||
class UserCreate(BaseModel): |
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.
this should be in another file, schemas/user.py
margin_app/app/api/user.py
Outdated
class UserCreate(BaseModel): | ||
wallet_id: str | ||
|
||
class UserResponse(BaseModel): |
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.
this should be in another file, schemas/user.py
margin_app/app/api/user.py
Outdated
created_at: datetime | ||
|
||
@router.post("/users/", response_model=UserResponse) | ||
async def create_user(user: UserCreate, db: AsyncSession = Depends(get_db)): |
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.
use user_crud
https://github.com/djeck1432/spotnet/blob/main/margin_app/app/crud/user.py#L115 as it was in task description
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.
Fix pylint issue as well
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.
Fix pylint issues
@Oluwatos94 Please finalize your PR as soon as possible, You ran out of time |
@djeck1432 Could you check if it's all good now? Thank you! |
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.
Fix pylint issue
@Oluwatos94 sync with main branch please |
@Oluwatos94 any updates so far? |
Please, I will fix it when I get home. Not close to my laptop at the moment
🙏
…On Thu, Feb 27, 2025, 6:42 PM djeck1432 ***@***.***> wrote:
@Oluwatos94 <https://github.com/Oluwatos94> any updates so far?
—
Reply to this email directly, view it on GitHub
<#658 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2O4NL5NKS2ZULMP5SKEJTT2R5E6RAVCNFSM6AAAAABX24Z546VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBYGY3DMMZUGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: djeck1432]*djeck1432* left a comment (djeck1432/spotnet#658)
<#658 (comment)>
@Oluwatos94 <https://github.com/Oluwatos94> any updates so far?
—
Reply to this email directly, view it on GitHub
<#658 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2O4NL5NKS2ZULMP5SKEJTT2R5E6RAVCNFSM6AAAAABX24Z546VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBYGY3DMMZUGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.
LGTM
Draft: [Margin App] Create endpoint for creating user
Description
This PR adds a new endpoint for creating a user. The endpoint accepts a
wallet_id
and returns the created user object.Changes
create_user
endpoint inuser.py
crud/user.py
Notes
This is a draft PR. Further implementation and testing will be done in subsequent commits.