Skip to content
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: 스터디 정보 수정 기능 구현 #262

Merged
merged 3 commits into from
Aug 9, 2023
Merged

Conversation

yujamint
Copy link
Member

@yujamint yujamint commented Aug 8, 2023

😋 작업한 내용

스터디 정보 수정 기능 구현

🙏 PR Point

StudyUpdateRequest와 StudyCreateRequest의 코드가 완전히 일치하는데, 여러분들은 이거에 대해서 어떻게 생각하시나요??

👍 관련 이슈

@yujamint yujamint added backend🤎 백엔드 feat 기능 추가 jasmine👙 민트 labels Aug 8, 2023
@yujamint yujamint self-assigned this Aug 8, 2023
@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Test Results

20 files  20 suites   12s ⏱️
77 tests 77 ✔️ 0 💤 0
78 runs  78 ✔️ 0 💤 0

Results for commit baa316c.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@kevstevie kevstevie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;

public record StudyUpdateRequest(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

완전히 똑같다면 같은 리퀘스트를 재활용해도 될 것 같아요

Given "jinwoo"가 제목-"자바", 정원-"6"명, 예상시작일-"5"일 뒤, 총 회차-"5"회, 주기-"1w", 소개-"수정 전 스터디 소개"로 스터디를 개설한다.
When "jinwoo"가 "자바" 스터디의 정보를 제목-"자바스크립트", 정원-"8"명, 예상시작일-"3"일 뒤, 총 회차-"6"회, 주기-"5d", 소개-"수정 후 스터디 소개"로 수정한다.
When "jinwoo"가 스터디 상세 조회에서 이름이 "자바스크립트"인 스터디를 조회한다.
Then 스터디 상세조회 결과가 제목-"자바스크립트", 정원-"8"로 조회된다.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

마지막줄 개행해주세요

@Transactional
public void update(Member member, Long studyId, StudyUpdateRequest request) {
Study study = findStudyById(studyId);
study.validateMaster(member);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p1: validate 메서드를 updateInformation 안에서 호출하는게 어떨까요?

@yujamint yujamint merged commit 58e87e6 into BE/develop Aug 9, 2023
2 checks passed
@yujamint yujamint deleted the BE/feature/257 branch August 9, 2023 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend🤎 백엔드 feat 기능 추가 jasmine👙 민트
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants