#501- implement Api call to LoginService #596

Closed
a24nedka wants to merge 3 commits from feature/501-implement-loginservice-api into team_2_week_3
Collaborator

Add API calls for login and signup buttons.

Created API functions in authService.js:

  • loginUser() sends POST request to /auth/login
  • signUpUser() sends POST request to /auth/SignUp

Updated LoginModal:

  • Connected Login button to loginUser()
  • Connected Sign Up button to signUpUser()
  • Username and password are taken from input fields
  • Dummy data is used for firstname, lastname and email to match backend request structure

Verified functionality:

  • Clicking buttons triggers API calls
  • Requests are visible in Network tab
  • POST requests sent to correct endpoints (/auth/login and /auth/SignUp)
  • Payload includes expected data (username, password, etc.)
Add API calls for login and signup buttons. **Created API functions in authService.js:** - loginUser() sends POST request to /auth/login - signUpUser() sends POST request to /auth/SignUp **Updated LoginModal:** - Connected Login button to loginUser() - Connected Sign Up button to signUpUser() - Username and password are taken from input fields - Dummy data is used for firstname, lastname and email to match backend request structure **Verified functionality:** - Clicking buttons triggers API calls - Requests are visible in Network tab - POST requests sent to correct endpoints (/auth/login and /auth/SignUp) - Payload includes expected data (username, password, etc.)
Add API calls for login and signup buttons.
Collaborator

I dont think this pull request is following the naming convention, we need a descriptive name not only the reference to the original issue

I dont think this pull request is following the naming convention, we need a descriptive name not only the reference to the original issue
a24nedka changed title from issue #501 to #501- implement Api call to LoginService #596 2026-04-27 13:26:10 +00:00
a24nedka changed title from #501- implement Api call to LoginService #596 to #501- implement Api call to LoginService 2026-04-27 13:26:26 +00:00
Author
Collaborator

@b24johka
Fixed the problem

@b24johka Fixed the problem
Collaborator

Review on #501

Whats done

Tested on Windows 11 using Edge

  • Tested login and sign up functionality
  • App starts correctly
    • Login modal opens as expected
    • Tested login with username and password
    • Tested Sign Up button
    • Verified API calls in Network tab
    • POST requests are sent to correct endpoints (/auth/login and /auth/SignUp)
    • Payload contains expected data
    • Both requests return HTTP 500 (Internal Server Error)

Inspected following files

  • frontend/src/app/App.js

    • Indentation/code styling

      • Follows prettier
    • Naming convention

      • Naming is okay
    • Comments

    • good

    • General code quality

      • App.js is easy to read
  • frontend/src/features/login/LoginModal.js

    • Indentation/code styling
      • sounds good
    • Naming convention
      • Naming is clear
    • Comments
      • Comment is understandable
    • General code quality
      • API calls are connected, but there is no error handling for failed requests
  • frontend/src/features/login/LoginModal.module.css

    • Indentation/code styling
      • Follows CSS style
    • Naming convention
      • signupButton name is clear
    • Comments
      • No comments needed
    • General code quality
      • Styling is simple and clear
  • frontend/src/services/authService.js

    • Indentation/code styling
      • follow prettier
    • Naming convention
      • loginUser and signUpUser are clear function names
    • Comments
      • Comments are clear and useful
    • General code quality
      • Good separation of API logic into a service file

What needs to be done

  • frontend/src/features/login/LoginModal.js

    • Add basic error handling for failed API requests
  • Backend/API

    • Both login and signup requests return HTTP 500, needs investigation on backend side

Conclusion

  • The frontend sends login and signup API calls to the expected endpoints
  • Code structure is mostly good
  • Backend returns HTTP 500 during testing
    Needs minor improvements before merge.
# Review on #501 ## Whats done ### Tested on Windows 11 using Edge + Tested login and sign up functionality + App starts correctly + Login modal opens as expected + Tested login with username and password + Tested Sign Up button + Verified API calls in Network tab + POST requests are sent to correct endpoints (/auth/login and /auth/SignUp) + Payload contains expected data + Both requests return HTTP 500 (Internal Server Error) ### Inspected following files + frontend/src/app/App.js + Indentation/code styling + Follows prettier + Naming convention + Naming is okay + Comments + good + General code quality + App.js is easy to read + frontend/src/features/login/LoginModal.js + Indentation/code styling + sounds good + Naming convention + Naming is clear + Comments + Comment is understandable + General code quality + API calls are connected, but there is no error handling for failed requests + frontend/src/features/login/LoginModal.module.css + Indentation/code styling + Follows CSS style + Naming convention + signupButton name is clear + Comments + No comments needed + General code quality + Styling is simple and clear + frontend/src/services/authService.js + Indentation/code styling + follow prettier + Naming convention + loginUser and signUpUser are clear function names + Comments + Comments are clear and useful + General code quality + Good separation of API logic into a service file ## What needs to be done + frontend/src/features/login/LoginModal.js + Add basic error handling for failed API requests + Backend/API + Both login and signup requests return HTTP 500, needs investigation on backend side ## Conclusion + The frontend sends login and signup API calls to the expected endpoints + Code structure is mostly good + Backend returns HTTP 500 during testing Needs minor improvements before merge.
Added basic error handling to login and signup functionality. Addressed based on feedback from previous review.
Collaborator

Almost ready for merge, minor integration needed.(currently commented out in App.js), so it requires manual activation.

Almost ready for merge, minor integration needed.(currently commented out in App.js), so it requires manual activation.
Uncommented in app.js
Collaborator

Unfortunately neither the connection to endpoint nor the closing of the modal works. This PR will have to be rebased on new weekly branch or remade!

Unfortunately neither the connection to endpoint nor the closing of the modal works. This PR will have to be rebased on new weekly branch or remade!
a24vinla closed this pull request 2026-04-29 08:20:51 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!596
No description provided.