-
Notifications
You must be signed in to change notification settings - Fork 1
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
ALCS-2325 Tag/Category entities and cruds #1937
Conversation
fbarreta
commented
Oct 24, 2024
- Created Category and Tag entities
- Basic API CRUD functions
services/apps/alcs/src/alcs/admin/tag-category/tag-category.controller.spec.ts
Show resolved
Hide resolved
services/apps/alcs/src/alcs/admin/tag-category/tag-category.service.spec.ts
Show resolved
Hide resolved
return await this.service.create(createDto); | ||
} | ||
|
||
@Put('/:uuid') |
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.
It looks like in the downstream service you are updating only one field of the entity which is the name. Since it is a partial update, would it be better to use PATCH request instead of PUT?
return await this.service.create(createDto); | ||
} | ||
|
||
@Put('/:uuid') |
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.
Tag Category Controller is now using PATCH request for updating. Since both seem to be partial update, do you want to change this one to PATCH to be aligned?
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.
Sure !
Looking good overall! Impressed you took on such an ambitious ticket this early. My only sort of general comment would be to use more type annotations in the services and controllers. I feel like the majority of the issues I encounter day-to-day are due to ambiguous typing. |
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.
LGTM!