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

Feat/admin user name change functionality #2840

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

arcteggzz
Copy link
Contributor

FRO-198

My PR Fixes Fixes FRO-198 - Allows an admin User to update their Username in the backend.
Linear Ticket link:- https://linear.app/team-brainbox/issue/FRO-198/zuri-chat-changeset-username

Changes proposed

What were you told to do?

UPDATE AND SET USERNAME FOR ADMIN SETTINGS

What did you do?

  • Check if there is an admin user logged.
  • Get the User_id and the organization_id.
  • Use these details to change and update the User Name for the person logged in.
  • Make the patch request to the API backend.

Check List (Check all the applicable boxes)

🚨Please review the style guide for contributing and guidelines for contributing to this repository.

  • My code follows the code style of this project.
  • This PR does not contain plagiarized content.
  • The title and description of the PR is clear and explains the approach.
  • I am making a pull request against the dev branch (left side).
  • My commit messages styles matches our requested structure.
  • My code additions will fail neither code linting checks nor unit test.
  • I am only making changes to files I was requested to.

Screenshots/ Videos

image

Comment on lines +34 to +35
.then(res => console.log(res))
.catch(error => console.log(error.response));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove console.log and console.error. Use toast to show notifications.

@JulianaSau
Copy link
Collaborator

Also resolve the conflicts on your branch

event.preventDefault();
axios
.patch(
`https://api.zuri.chat/organizations/${organization_id}/members/${user_member_id}/profile`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

use the base url constant provided in the app
it should be coming from @zuri-utilities

}
}
)
.then(res => console.log(res))
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are you chaining a .then if you do not intend to use the response?

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

Successfully merging this pull request may close these issues.

None yet

4 participants