Skip to content
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

Feat: User Login API issue#47 #60

Merged

Conversation

mtreacy002
Copy link
Member

Description

Added Login User API

Fixes #47

Type of Change:

  • Code

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

Try to login a user
Gif file: https://media.giphy.com/media/L329CK5dENhpM68PVN/giphy.gif

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials

Code/Quality Assurance Only

  • My changes generate no new warnings
  • My PR currently breaks something (fix or feature that would cause existing functionality to not work as expected)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been published in downstream modules

@mtreacy002 mtreacy002 requested review from ramitsawhney27 and a team June 19, 2020 13:24
@mtreacy002 mtreacy002 self-assigned this Jun 19, 2020
@mtreacy002 mtreacy002 added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program. labels Jun 19, 2020
@mtreacy002 mtreacy002 added this to the GSoc: Coding Phase 1 milestone Jun 19, 2020
@mtreacy002
Copy link
Member Author

Update @anitab-org/bridgeintech-maintainers . I've just created Login API. Can you please review this PR. @ramitsawhney27 , do you want the test cases to be done on a separate PR or just in this one? I'm thinking of waiting for the Register API test cases PR to be approved and add Login API on top of that code base, so will do a separate PR from this one. What do you think?

@mtreacy002
Copy link
Member Author

Update @anitab-org/bridgeintech-maintainers . I've just pushed latest code change to fix message display connection error response.

Copy link
Member

@isabelcosta isabelcosta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtreacy002 I added comments according to our 1:1 today, where we discussed you can remove the Refresh API related code, as this is not a priority for MVP.

app/api/models/user.py Outdated Show resolved Hide resolved
app/api/models/user.py Outdated Show resolved Hide resolved
app/api/ms_api_utils.py Outdated Show resolved Hide resolved
app/api/resources/users.py Show resolved Hide resolved
app/api/ms_api_utils.py Outdated Show resolved Hide resolved
app/api/ms_api_utils.py Show resolved Hide resolved
app/api/ms_api_utils.py Outdated Show resolved Hide resolved
app/api/ms_api_utils.py Outdated Show resolved Hide resolved
@mtreacy002 mtreacy002 force-pushed the issue47-create-login-api branch 2 times, most recently from f074711 to a9ef471 Compare June 23, 2020 03:45
@mtreacy002 mtreacy002 force-pushed the issue47-create-login-api branch 2 times, most recently from 1d6a64d to ff18b92 Compare June 27, 2020 01:21
@mtreacy002
Copy link
Member Author

Update @anitab-org/bridgeintech-maintainers. I have pull rebased the changes made per mentor feedback on PR #59 (Register API tests) onto this PR as well so the changes made here already in sync with changes done on PR #59.

app/api/ms_api_utils.py Outdated Show resolved Hide resolved
app/api/ms_api_utils.py Show resolved Hide resolved

def http_bad_request_checker(result):

if result[0] == f"{messages.USERNAME_FIELD_IS_MISSING}":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this change now? should be indexed using the named tuple?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It is now (on PR #65), already using namedtuple. This Login PR #60 was made before that namedtuple PR. I don't think I need to change in this PR since it'll be overwritten by PR #65 changes if that one also got approved after this.

screenshot from namedtuple ms_api_utils.py

Screen Shot 2020-06-27 at 7 35 48 pm

The commit history showing sequence of changes

Screen Shot 2020-06-27 at 7 36 02 pm

@mtreacy002
Copy link
Member Author

@anitab-org/bridgeintech-maintainers . Any progress on this PR review? If there's no other changes required, can you please approve this PR?
Note: This PR is the first in line to be merged out of all the current open PRs. Thanks.

Copy link

@foongminwong foongminwong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested User Login API here with no errors

@mtreacy002
Copy link
Member Author

mtreacy002 commented Jul 3, 2020

@ramitsawhney27 as you have reviewed tthis PR and verbally approves it in BIT weekly meeting last week, can you please give the formal approval so it can be merged? Thanks

@isabelcosta isabelcosta merged commit b7908fc into anitab-org:develop Jul 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Program: GSOC Related to work completed during the Google Summer of Code Program.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Development: Create Login API
4 participants