-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
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.
awesome job
Why are the tests failing? |
ridemyway/utils/db_queries.py
Outdated
sql = """INSERT INTO | ||
appuser (username, name, gender, usertype, date_joined, | ||
contacts, email, password) | ||
VALUES ('%s','%s','%s','%s', '%s', %d, '%s', '%s')""" % ( |
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.
You can also use the string.format() method to insert the data
ridemyway/api/v2/controllers/auth.py
Outdated
|
||
def signup(self, **kwargs): | ||
""" | ||
|
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.
You have an empty comment
ridemyway/__init__.py
Outdated
@@ -47,14 +48,7 @@ def create_app(config_name): | |||
app.database = DATABASE | |||
app.config.from_object(config[config_name]) | |||
app.config['BUNDLE_ERRORS'] = True |
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.
Its good practice to put all your configurations in the config file
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.
Minor fix, can be merged
ridemyway/utils/db_queries.py
Outdated
app.conn.commit() | ||
return True | ||
except psycopg2.Error: | ||
print('Roll back, user not added') |
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 this relevant to the code block?
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
/api/v2/auth/signup
How should one test this endpoint?
git clone https://github.com/JoshuaOndieki/ridemyway-api.git
git checkout ft-signup-158791391
nosetests ridemyway/tests/test_v2/test_auth/test_signup.py
to see the signup tests pass. Alternatively, runpytest 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