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

Implement Forum User Update Feature using HTTP PATCH #57

Merged
merged 2 commits into from
Mar 19, 2022
Merged

Implement Forum User Update Feature using HTTP PATCH #57

merged 2 commits into from
Mar 19, 2022

Conversation

R055A
Copy link
Contributor

@R055A R055A commented Mar 18, 2022

Description

Implement update feature that responds to HTTP PATCH requests for updates of any valid editable forum user document field(s) with the updated forum user data.

Refactored existing User controller functions to use added validation lib functionality, moved (dummy) password hash function to model.

Added an email validation.

Related Issue

Solves #22

Type of change

  • New feature (enhancement)

How Has This Been Tested?

Multiple automated test cases for

  • successfully updating all editable forum user document fields
  • unsuccessfully updating all editable forum user document fields with valid but unmatching ID
  • unsuccessfully updating with invalid forum user ID
  • unsuccessfully updating with invalid username field
  • unsuccessfully updating with invalid displayName field
  • unsuccessfully updating with invalid email field
  • unsuccessfully updating with invalid password field
  • Automated testing

Checklist:

  • Does a similar (open or closed) pull request not already exist?
  • Is the pull request head repository a fork repository?
  • Is the pull request compare branch a development branch?
  • Is the code documented, particularly in hard-to-understand areas?
  • Does the code build without new warnings?
  • Has testing been performed that proves changes are effective and work?
  • Has a self- and/or peer-review of the code been performed?
  • Does all new and existing automated testing pass?
  • Is the person responsible for the repository assigned to the pull request?
  • Is the pull request linked to a project?
  • Is the pull request linked to a milestone?

For more information, refer to the Contributing Guidelines and Code of Conduct links at the bottom of this page.

add test cases for user update
refactor password hash (dummy) function to model
add email validation
refactor user controller to use lib functions, reduce redundancy
@R055A R055A added the enhancement New feature or request label Mar 18, 2022
@R055A R055A added this to the Assignment 1 milestone Mar 18, 2022
@R055A R055A self-assigned this Mar 18, 2022
@R055A R055A requested a review from a team as a code owner March 18, 2022 09:08
@R055A R055A added this to In progress in Team 5 - Assignment 1 - Backend via automation Mar 18, 2022
@R055A R055A linked an issue Mar 18, 2022 that may be closed by this pull request
Copy link
Contributor

@hiin3d55 hiin3d55 left a comment

Choose a reason for hiding this comment

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

LGTM! I specifically like the refactored part.

Team 5 - Assignment 1 - Backend automation moved this from In progress to Reviewer approved Mar 18, 2022
@R055A R055A merged commit 4ef8f51 into SE701-T5:main Mar 19, 2022
Team 5 - Assignment 1 - Backend automation moved this from Reviewer approved to Done Mar 19, 2022
@R055A R055A deleted the update-user branch March 19, 2022 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Implement request for editing a forum user data
2 participants