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

[Delivers #158791391] API v2 Signup Endpoint #29

Merged
merged 33 commits into from
Jul 4, 2018

Conversation

JoshuaOndieki
Copy link
Owner

What does this PR do?
Adds signup endpoint to the API

Description of Task to be completed
Adding a signup endpoint to allow drivers | riders to sign up

POST /api/v2/auth/signup

Tasks achieved in this PR

  • POST /api/v2/auth/signup

How should one test this endpoint?

  • Clone this repo using git clone https://github.com/JoshuaOndieki/ridemyway-api.git
  • Check the ReadMe for instructions on setting up the project.
  • git checkout ft-signup-158791391
  • Run nosetests ridemyway/tests/test_v2/test_auth/test_signup.py to see the signup tests pass. Alternatively, run pytest ridemyway/tests/test_v2/test_auth/test_signup.py

But why is the build failing 😕 ?
The build is also testing endpoints which are yet to be implemented. Bear with me while I implement them.

How can you help?
Review my work and let me know any semantic, technical or syntax/standards errors I may have.
I will greatly appreciate any feature/change suggestions too 😃

Resources & Libs
This Pivotal Tracker board was used to plan and manage the tasks.

Relevant PIvotal Tracker Stories?
#158791391

@JoshuaOndieki JoshuaOndieki changed the base branch from master to develop July 3, 2018 22:18
@JoshuaOndieki JoshuaOndieki added the Feedback Wanted Requesting for feedback from peers and the Github community at large label Jul 3, 2018
Copy link

@LarryKarani LarryKarani left a comment

Choose a reason for hiding this comment

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

awesome job

Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 3, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
@meshack-mbuvi
Copy link

meshack-mbuvi commented Jul 4, 2018

Why are the tests failing?

sql = """INSERT INTO
appuser (username, name, gender, usertype, date_joined,
contacts, email, password)
VALUES ('%s','%s','%s','%s', '%s', %d, '%s', '%s')""" % (
Copy link

Choose a reason for hiding this comment

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

You can also use the string.format() method to insert the data


def signup(self, **kwargs):
"""

Choose a reason for hiding this comment

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

You have an empty comment

@@ -47,14 +48,7 @@ def create_app(config_name):
app.database = DATABASE
app.config.from_object(config[config_name])
app.config['BUNDLE_ERRORS'] = True

Choose a reason for hiding this comment

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

Its good practice to put all your configurations in the config file

Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Repository owner deleted a comment Jul 4, 2018
Copy link

@LWanjiru LWanjiru left a comment

Choose a reason for hiding this comment

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

Minor fix, can be merged

app.conn.commit()
return True
except psycopg2.Error:
print('Roll back, user not added')
Copy link

Choose a reason for hiding this comment

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

Is this relevant to the code block?

Repository owner deleted a comment Jul 4, 2018
@JoshuaOndieki JoshuaOndieki merged commit 5355da1 into develop Jul 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Wanted Requesting for feedback from peers and the Github community at large
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants