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

Add user service management #470

Merged
merged 5 commits into from
Dec 12, 2024
Merged

Add user service management #470

merged 5 commits into from
Dec 12, 2024

Conversation

hikasap
Copy link
Contributor

@hikasap hikasap commented Dec 11, 2024

Managing user authentication and session handling was previously scattered across components, making the codebase harder to maintain and extend. To address this, we introduced a generic UserService class to centralize all user-related logic, improving reusability, maintainability, and consistency in handling authentication.

Key Updates

  • Added UserService.js: Consolidated user-related logic such as login, logout, session checks, token management, and user data access.
  • Refactored Login.js: Replaced direct API calls with UserService.login(), improved error handling, and added toast notifications for user feedback.
  • Updated Dashboard.js: Streamlined session checks and logout functionality using UserService, removed redundant localStorage calls, and cleaned up unnecessary logging.

@hikasap hikasap added the frontend issue related with frontend label Dec 11, 2024
@hikasap hikasap self-assigned this Dec 11, 2024
@danzio19 danzio19 merged commit 231f9df into dev Dec 12, 2024
@danzio19
Copy link
Contributor

Looks good, merged to dev. Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend issue related with frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants