-
-
Notifications
You must be signed in to change notification settings - Fork 126
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: create user endpoint #77
feat: create user endpoint #77
Conversation
… a user in keyshade
…o create a user in keyshade" This reverts commit a858cf6.
… a user in keyshade
PR Description updated to latest commit (c56ce3c) |
PR Analysis
PR Feedback💡 General suggestions: The PR is well-structured and the code changes are clear. However, it would be beneficial to include unit tests for the new features to ensure they work as expected. Also, consider handling potential exceptions that could be thrown when creating a new user or sending an email. 🤖 Code feedback:
✨ Usage guide:Overview:
With a configuration file, use the following template:
See the review usage page for a comprehensive guide on using this tool. |
@Sachinsharma01 thanks man! I will surely review this tomorrow morning! |
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.
Seems that there are some merge conflicts. No worries, I'll resolve them myself and merge this when I can! |
🎉 This PR is included in version 1.0.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
User description
Description
Adding an endpoint that is accessible to Admins only that let, Admin to create a user.
Give a summary of the change that you have made
Fixes #[ISSUENO]
#13
Dependencies
Mention any dependencies/packages used
NO
Future Improvements
Mention any improvements to be done in future related to any file/feature
Mentions
Mention and tag the people
Screenshots of relevant screens
Add screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
Type
Enhancement
Description
This PR introduces a new feature that allows admins to create new users. The main changes include:
accountLoginEmail
method to theIMailService
interface and its implementation in theMailService
andMockMailService
classes.ICrateUserDTO
for user creation.createUser
method to theUserController
class, which is guarded by theAdminGuard
.createUserByAdmin
method to theIUserRepository
interface and its implementation in theUserRepository
andMockUserRepository
classes.createUser
method to theUserService
class, which checks for duplicate users and sends a login email to the newly created user.Changes walkthrough
9 files
interface.service.ts
apps/api/src/mail/services/interface.service.ts
Added a new method
accountLoginEmail
to theIMailService
interface.
mail.service.ts
apps/api/src/mail/services/mail.service.ts
Implemented the
accountLoginEmail
method in theMailService
class.mock.service.ts
apps/api/src/mail/services/mock.service.ts
Implemented the
accountLoginEmail
method in theMockMailService
class.user.controller.ts
apps/api/src/user/controller/user.controller.ts
Added a new
createUser
method to theUserController
class, which is guarded by the
AdminGuard
.create.user.ts
apps/api/src/user/dto/create.user/create.user.ts
Created a new data transfer object
ICrateUserDTO
for usercreation.
interface.repository.ts
apps/api/src/user/repository/interface.repository.ts
Added a new method
createUserByAdmin
to theIUserRepository
interface.mock.repository.ts
apps/api/src/user/repository/mock.repository.ts
Implemented the
createUserByAdmin
method in theMockUserRepository
class.user.repository.ts
apps/api/src/user/repository/user.repository.ts
Implemented the
createUserByAdmin
method in theUserRepository
class.user.service.ts
apps/api/src/user/service/user.service.ts
Added a new
createUser
method to theUserService
class,which checks for duplicate users and sends a login email to
the newly created user.
✨ Usage guide:
Overview:
The
describe
tool scans the PR code changes, and generates a description for the PR - title, type, summary, walkthrough and labels. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.When commenting, to edit configurations related to the describe tool (
pr_description
section), use the following template:With a configuration file, use the following template:
Enabling\disabling automation
meaning the
describe
tool will run automatically on every PR, will keep the original title, and will add the original user description above the generated description.the tool will replace every marker of the form
pr_agent:marker_name
in the PR description with the relevant content, wheremarker_name
is one of the following:type
: the PR type.summary
: the PR summary.walkthrough
: the PR walkthrough.Note that when markers are enabled, if the original PR description does not contain any markers, the tool will not alter the description at all.
Custom labels
The default labels of the
describe
tool are quite generic: [Bug fix
,Tests
,Enhancement
,Documentation
,Other
].If you specify custom labels in the repo's labels page or via configuration file, you can get tailored labels for your use cases.
Examples for custom labels:
Main topic:performance
- pr_agent:The main topic of this PR is performanceNew endpoint
- pr_agent:A new endpoint was added in this PRSQL query
- pr_agent:A new SQL query was added in this PRDockerfile changes
- pr_agent:The PR contains changes in the DockerfileThe list above is eclectic, and aims to give an idea of different possibilities. Define custom labels that are relevant for your repo and use cases.
Note that Labels are not mutually exclusive, so you can add multiple label categories.
Make sure to provide proper title, and a detailed and well-phrased description for each label, so the tool will know when to suggest it.
More PR-Agent commands
See the describe usage page for a comprehensive guide on using this tool.