-
Notifications
You must be signed in to change notification settings - Fork 45
PIMS-1529: Projects Controller - addProject #2336
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
Conversation
|
π Deployment Information The Express API Image has been built with the tag: |
|
Code Climate has analyzed commit 0a5f222 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 93.9%. View more on Code Climate. |
| import { DeepPartial } from 'typeorm'; | ||
| import { Project } from '@/typeorm/Entities/Project'; | ||
|
|
||
| interface ProjectPropertyIds { |
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.
There's already the same type as an exported member of projectsServices, probably best to consolidate this to one place.
| const { | ||
| project, | ||
| propertyIds, | ||
| }: { project: DeepPartial<Project>; propertyIds: ProjectPropertyIds } = req.body; |
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.
Do we care about the length of the propertyIds arrays at all? Is a project with no properties allowed to be created?
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.
That's a good question, as this was possible in the old PIMS and a user could start creating a project save it and enter the properties at a later time.
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.
That being the case, I think I'm fine with keeping this as a valid option for now
π― Summary
PIMS-1529:
Adding the service function to the addDisposalProject endpoint.
Still need to add some user permissions check.
π° Checklist