-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature 28 create user controller and service #32
Feature 28 create user controller and service #32
Conversation
added prettier definition to clear all the red from vs code
added routes to create a user and delete a user
Added the route to update a user to creator.
@theGaryLarson I'm noticing that on PR's where another push is made, CI is running Continuous-Integration / build-and-test and not completing. @Exochos I'm pretty sure if this PR is closed and reopened, it will run CI (on pull-request) / Continuous-Integration / build-and-test (pull_request) and complete. Perhaps something to look into more. |
Removed admin routes from auth routes and added a working adminAddUser route to the user side. Also added a password to the user.module so that the admin add user route works.
Added a delete route for admins.
Further updated the user.control and user.services for an adminUpdate route
added mocked user tests for admin routes.
I refactored the admin code to use the create user dto and removed the test cases cause I can't get the relative path working.
updated the service and controller to use the CreateUserDto.
codefactor thinks this needs to be changed
@taylorpapke Thanks for pointing this out. I noticed that opening and reopening doesn't retrigger the CI but a push does. Something I didn't really notice when it was my branches I was pushing too. I will have to tweak CI to trigger when PR is opened so we can trigger it on other's PRs. |
Updated route names and removed extra routes
Lot to unpack here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I fixed the CodeFactor errors. there were three 2 were just minor styling adjustments and 1 was when renaming UserSchema to UserAuthSchema the import wasn't adjusted in the auth>schema or auth>module.
Also, I made some minor changes to the endpoints to follow the standards. pluralized user. Now users. and added find word to findById path e.g. users/find/:id
nsc-events-nestjs_sprint2_Feature 28 create user controller and service
draft here. Postman works.
http://localhost:3000/api/auth/adminadduser
http://localhost:3000/api/auth/admindelete
http://localhost:3000/api/auth/adminupdateuser