Add user registration endpoint with validation and JWT authentication#17
Open
Archiljain wants to merge 2 commits into
Open
Add user registration endpoint with validation and JWT authentication#17Archiljain wants to merge 2 commits into
Archiljain wants to merge 2 commits into
Conversation
6 tasks
olaysco
requested changes
Jul 16, 2025
| @@ -0,0 +1,20 @@ | |||
| from backend.database import db | |||
| transactions = db.relationship('Transaction', backref='user', lazy=True, cascade='all, delete-orphan') | ||
| categories = db.relationship('Category', backref='user', lazy=True, cascade='all, delete-orphan') | ||
| budgets = db.relationship('Budget', backref='user', lazy=True, cascade='all, delete-orphan') | ||
| # categories = db.relationship('Category', backref='user', lazy=True, cascade='all, delete-orphan') |
Collaborator
There was a problem hiding this comment.
@Archiljain This change is also out of scope for this PR
| config_name = os.environ.get('FLASK_ENV') or 'default' | ||
| app = create_app(config[config_name]) | ||
| app.run(host='0.0.0.0', port=4000, debug=True) | ||
| app.run(host='0.0.0.0', port=7000, debug=True) |
Collaborator
There was a problem hiding this comment.
@Archiljain Port configuration changes is out of scope.. you can switch port on your local via .env file. please see the readme file.
| from flask_jwt_extended import create_access_token, jwt_required, get_jwt_identity | ||
| from backend.models.user import User | ||
| from backend.database import db | ||
| from werkzeug.security import generate_password_hash |
Collaborator
There was a problem hiding this comment.
@Archiljain Unused import. The user model has this module imported already
| user.set_password(password) | ||
|
|
||
| # hashing the password | ||
|
|
Collaborator
There was a problem hiding this comment.
The spaces should be cleanup
Author
|
I have made the changes which are requested. Let me know if anything else is needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/api/auth/registerroute