-
Notifications
You must be signed in to change notification settings - Fork 1
COMMENTS-PRIVATE: Создание/обновление комментария пользователем #84 и #86 #97
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
SergikF
left a comment
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.
Критичных замечаний у меня нет, свои мысли представил в необязательных комментах.
|
|
||
| @Override | ||
| @Transactional | ||
| public CommentDto addComment(Long userId, Long eventId, NewCommentDto newCommentDto) { |
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.
[НЕОБЯЗАТЕЛЬНО] Хоть я и склоняюсь к мысли, что требование передавать в методах не более 2-х параметров - это определенное требование, но, по моему, в коде были такие методы и это не вызвало замечаний ревьювера.
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.
Я понимаю о чем ты, об этом говорил старший преподаватель, однако в тз такого требования нет. И видимо, ревьюеру это не принципиально, т.к. параметров не на столько много, чтобы их количество вызывало трудности в разборе написанного кода.
.../test/java/ru/practicum/explorewithme/main/controller/priv/PrivateCommentControllerTest.java
Show resolved
Hide resolved
main-service/src/main/java/ru/practicum/explorewithme/main/service/CommentServiceImpl.java
Show resolved
Hide resolved
impatient0
left a comment
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.
Хорошая реализация! Логика отлично прописана; есть только пара моментов, которые стоит поправить, прежде чем можно будет мёрджить – написал в комментариях.
main-service/src/main/java/ru/practicum/explorewithme/main/service/CommentServiceImpl.java
Outdated
Show resolved
Hide resolved
main-service/src/main/java/ru/practicum/explorewithme/main/service/CommentServiceImpl.java
Outdated
Show resolved
Hide resolved
main-service/src/main/java/ru/practicum/explorewithme/main/service/CommentServiceImpl.java
Outdated
Show resolved
Hide resolved
main-service/src/main/java/ru/practicum/explorewithme/main/service/CommentServiceImpl.java
Outdated
Show resolved
Hide resolved
progingir
left a comment
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.
работа супер, оставила пару комментов, в целом, ребята там за меня уже достаточно написали :)
.../src/main/java/ru/practicum/explorewithme/main/controller/priv/PrivateCommentController.java
Show resolved
Hide resolved
main-service/src/main/java/ru/practicum/explorewithme/main/service/CommentServiceImpl.java
Outdated
Show resolved
Hide resolved
.../test/java/ru/practicum/explorewithme/main/controller/priv/PrivateCommentControllerTest.java
Outdated
Show resolved
Hide resolved
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.
[НЕОБЯЗАТЕЛЬНО] в тестах можно добавить проверку на корректность значений полей createdOn, updatedOn, isEdited в возвращаемом CommentDto. сейчас ты проверяешь только текст и флаг isEdited
progingir
left a comment
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.
крутышка
impatient0
left a comment
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.
Всё супер, мёрджим!
Реализован эндпоинт POST /users/{userId}/comments?eventId={eventId} и соответствующая логика сервиса для создания нового комментария авторизованным пользователем.
Реализован эндпоинт PATCH /users/{userId}/comments/{commentId} и соответствующая логика сервиса для обновления пользователем текста своего комментария. Обновление возможно только в течение 6 часов после создания и если комментарий не был "мягко" удален.
Прописаны: