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

#486 users backend refactoring #511

Merged
merged 12 commits into from Jan 17, 2023
Merged

Conversation

RChandler234
Copy link
Contributor

@RChandler234 RChandler234 commented Dec 27, 2022

Notes

This is me taking a first pass at this based on what I saw in the risks PR. There are definitely some places where I need some help(what to return for updateUserSettings and verification I'm doing the userLogin ones correctly). I'm not really sure what you meant by #7 in the ticket, I wasn't sure where the userId was a param I shouldn't change/ where it's a userId I should replace with the auth userId. Also I still need to do the test stuff, but wanted to get what I have done up first.

To Do

Update user tests and user test data

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #486

Copy link
Collaborator

@anthonybernardi anthonybernardi left a comment

Choose a reason for hiding this comment

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

nice work!

src/backend/src/services/users.services.ts Show resolved Hide resolved
src/backend/src/services/users.services.ts Outdated Show resolved Hide resolved
src/backend/src/services/users.services.ts Outdated Show resolved Hide resolved
src/backend/src/transformers/auth-user.transformer.ts Outdated Show resolved Hide resolved
src/backend/src/prisma-query-args/auth-user.query-args.ts Outdated Show resolved Hide resolved
src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
@Ari-S-123 Ari-S-123 added back-end technical improvement Improvements a user might not notice labels Jan 12, 2023
@RChandler234
Copy link
Contributor Author

Let me know if I need to change any of the stub data, wasn't sure what to change there tbh. Also could you explain what the jest.Spyons are doing in the tests, I know they're mocking returns from prisma, but I'm not specifically sure how/why

Copy link
Collaborator

@anthonybernardi anthonybernardi left a comment

Choose a reason for hiding this comment

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

awesome! pretty small stuff left

src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
src/backend/src/controllers/users.controllers.ts Outdated Show resolved Hide resolved
src/backend/src/routes/users.routes.ts Outdated Show resolved Hide resolved
src/backend/src/transformers/user.transformer.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@anthonybernardi anthonybernardi left a comment

Choose a reason for hiding this comment

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

yahoo

Copy link
Collaborator

@anthonybernardi anthonybernardi left a comment

Choose a reason for hiding this comment

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

yahoo2

@anthonybernardi anthonybernardi merged commit 48209e8 into develop Jan 17, 2023
@anthonybernardi anthonybernardi deleted the #486-users-backend-refactoring branch January 17, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end technical improvement Improvements a user might not notice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend Refactoring - Users
3 participants