Skip to content

Added login functionality, fixed a typo in auth_routes.py and fixed services.py typos#27

Merged
TemplarBrotherKnight merged 6 commits into
masterfrom
feature/user-login
Feb 1, 2026
Merged

Added login functionality, fixed a typo in auth_routes.py and fixed services.py typos#27
TemplarBrotherKnight merged 6 commits into
masterfrom
feature/user-login

Conversation

@TemplarBrotherKnight
Copy link
Copy Markdown
Contributor

📝 Description

I added login functionality and tested it with postman.

🔗 Linked Issue (Required)

Closes: #11


🧪 Testing

I ran the server with "flask run" and then tested the "/login" route with several tests.

  1. I registered a new user so I know his information.
  2. I tried logging in with a username and a password and then with an email and a password and got 200 with the appropriate text.
  3. I tried logging in with an empty password and no password key declared at all, no username and no email address and got the same result 400, with the appropriate text.
  4. I tried logging in with the correct username/email and wrong password and got 401 with the appropriate text.

🎓 Learning Reflection

Have more skill. The problem was a skill issue.

📸 Screenshots / Logs (if applicable)

Screenshot_2 Screenshot_4 Screenshot_5 Screenshot_6 Screenshot_7

Comment thread backend/routes/auth_routes.py Outdated
Comment thread backend/routes/auth_routes.py Outdated
Comment thread backend/routes/auth_routes.py Outdated
Comment thread backend/routes/auth_routes.py Outdated
Copy link
Copy Markdown
Contributor

@karastoyanov karastoyanov left a comment

Choose a reason for hiding this comment

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

login route is correct, but we can optimize it a bit

Copy link
Copy Markdown
Contributor

@karastoyanov karastoyanov left a comment

Choose a reason for hiding this comment

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

LGTM

Aleksandar Karastoyanov added 2 commits February 1, 2026 16:56
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
Signed-off-by: Aleksandar Karastoyanov <a.karastoyanov@utp.bg>
@TemplarBrotherKnight TemplarBrotherKnight merged commit a4dd7dc into master Feb 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] User Login Endpoint

2 participants