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

246 endpoint to update user #249

Merged
merged 18 commits into from
Oct 13, 2022
Merged

246 endpoint to update user #249

merged 18 commits into from
Oct 13, 2022

Conversation

itzgeebee
Copy link
Contributor

@itzgeebee itzgeebee commented Oct 10, 2022

Pre-Submission Checklist

  • Your pull request targets the main branch.
  • Branch name is descriptive and follows the guidelines here.
  • All tests pass . Use git commit --amend to amend any fixes.

Checklist:

  • All tests are passing.
  • Tested changes locally.
  • Improved documentation or readme where necessary.
  • Your commit messages format follows our commit message guideline here.

What does this PR do?

This PR adds the functionality to update users

How should this be manually tested?

  1. npm run test

@itzgeebee itzgeebee linked an issue Oct 10, 2022 that may be closed by this pull request
@itzgeebee itzgeebee requested a review from jocrah October 10, 2022 14:56
@itzgeebee itzgeebee self-assigned this Oct 10, 2022
@jocrah
Copy link
Contributor

jocrah commented Oct 10, 2022

@beblicarl, please you're needed here as well :)

@beblicarl
Copy link
Contributor

@beblicarl, please you're needed here as well :)

sure

@beblicarl
Copy link
Contributor

@itzgeebee , can you please work on the merge conflict

@itzgeebee
Copy link
Contributor Author

@itzgeebee , can you please work on the merge conflict

Done @beblicarl

@beblicarl
Copy link
Contributor

@itzgeebee , can you please work on the merge conflict

Done @beblicarl

awesome

@beblicarl
Copy link
Contributor

@itzgeebee , i pulled your branch and there's a lot of errors in your documentation. Kindly use Swagger Viewer extension on vscode so it picks up all those errors for you

@itzgeebee
Copy link
Contributor Author

@itzgeebee , i pulled your branch and there's a lot of errors in your documentation. Kindly use Swagger Viewer extension on vscode so it picks up all those errors for you

alright I would do that

@beblicarl
Copy link
Contributor

@itzgeebee , i don't think there should be required fields in the schema if you want to update, what do you think?

@itzgeebee
Copy link
Contributor Author

@itzgeebee , i don't think there should be required fields in the schema if you want to update, what do you think?

It wouldn't work otherwise. Since we are updating multiple fields, it's like we are adding a new user to the databases and if we don't make it required, the not null validation of the db would be triggered and it would throw an error.

@beblicarl
Copy link
Contributor

@itzgeebee , i don't think there should be required fields in the schema if you want to update, what do you think?

It wouldn't work otherwise. Since we are updating multiple fields, it's like we are adding a new user to the databases and if we don't make it required, the not null validation of the db would be triggered and it would throw an error.

okayy

@beblicarl
Copy link
Contributor

@jocrah , i am done, kindly review

src/schema.js Outdated Show resolved Hide resolved
src/schema.js Outdated Show resolved Hide resolved
@jocrah
Copy link
Contributor

jocrah commented Oct 11, 2022

@jocrah , i am done, kindly review

thanks @beblicarl

src/routes/users/update-user.2e.test.js Outdated Show resolved Hide resolved
src/routes/users/index.js Outdated Show resolved Hide resolved
src/routes/users/index.js Outdated Show resolved Hide resolved
src/services/users/update-user.js Outdated Show resolved Hide resolved
src/routes/users/index.js Outdated Show resolved Hide resolved
src/services/users/update-user.js Outdated Show resolved Hide resolved
src/services/users/update-user.js Outdated Show resolved Hide resolved
src/services/users/update-user.js Outdated Show resolved Hide resolved
src/services/users/update-user.test.js Outdated Show resolved Hide resolved
src/schema.js Outdated Show resolved Hide resolved
@itzgeebee
Copy link
Contributor Author

@jocrah I have made the changes

@jocrah
Copy link
Contributor

jocrah commented Oct 13, 2022

@jocrah I have made the changes

@itzgeebee okay nice, taking a look

src/services/users/update-user.test.js Outdated Show resolved Hide resolved
src/services/users/update-user.test.js Outdated Show resolved Hide resolved
src/routes/common/transformers.js Show resolved Hide resolved
src/routes/users/update-user.e2e.test.js Show resolved Hide resolved
src/services/users/update-user.js Outdated Show resolved Hide resolved
src/services/users/update-user.js Outdated Show resolved Hide resolved
@jocrah
Copy link
Contributor

jocrah commented Oct 13, 2022

nice one @itzgeebee 🚀

@jocrah jocrah merged commit 661b3e1 into main Oct 13, 2022
@itzgeebee
Copy link
Contributor Author

nice one @itzgeebee 🚀

Thanks boss @jocrah

Copy link
Contributor

@jocrah jocrah left a comment

Choose a reason for hiding this comment

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

post-merge reviews haha, just documentation

docs/swagger.yaml Show resolved Hide resolved
docs/swagger.yaml Show resolved Hide resolved
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.

endpoint to update user
3 participants