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

[BE] feat: 리뷰 폼 응답 재구현 #295

Merged
merged 28 commits into from
Aug 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2ea69e6
feat: TemplateController 추가 및 리뷰 템플릿 응답 기능 구현
Kimprodp Aug 10, 2024
c424c06
feat: 리뷰 템플릿 응답을 위한 dto 생성
Kimprodp Aug 10, 2024
5abbf92
refactor: 에러 응답 메세지 변경
Kimprodp Aug 10, 2024
8d10101
refactor: onSelectedOptionId 타입 변경
Kimprodp Aug 10, 2024
d532c2b
refactor: 도메인 id 제외 생성자 추가
Kimprodp Aug 10, 2024
8cdaabe
feat: TemplateService 추가 및 기본 템플릿 응답 기능 추가
Kimprodp Aug 10, 2024
9039ec8
feat: TemplateMapper 구현
Kimprodp Aug 10, 2024
d6f708f
refactor: mapping url 중복으로 인한 context 로딩 에러 해결을 위해 임시적으로 url 경로 변경
Kimprodp Aug 10, 2024
9c50413
refactor: 로깅 레벨 warn으로 변경
Kimprodp Aug 10, 2024
fa0ae42
refactor: 질문에 옵션 그룹이 없을 경우 null을 사용하도록 변경
Kimprodp Aug 10, 2024
1811deb
refactor: id 리스트를 즉시 로딩할 수 있도록 변경
Kimprodp Aug 10, 2024
f2edd17
refactor: 메서드명 변경
Kimprodp Aug 10, 2024
2c93220
test: 테스트 추가
Kimprodp Aug 10, 2024
bb2245c
test: DatabaseCleaner에서 CollectionTable로 생성된 테이블 초기화 하도록 변경
Kimprodp Aug 11, 2024
040cbea
refactor: Transactional readOnly 설정
Kimprodp Aug 11, 2024
274d8d3
refactor: 컨트롤러 요청 경로 변경
Kimprodp Aug 11, 2024
31999b1
refactor: response에서 null 가능한 필드 명시
Kimprodp Aug 11, 2024
de0c64d
style: 오타 수정
Kimprodp Aug 11, 2024
f6c309c
refactor: Question2 hasGuideline 메서드에서 guideline이 null 인 경우도 추가
Kimprodp Aug 11, 2024
f7b1ec3
refactor: 기본 사용 템플릿을 찾을 수 없는 경우에 대한 예외명과 로그 메세지 수정
Kimprodp Aug 11, 2024
207eccc
refactor: 옵션 그룹에 옵션 아이템이 없는 경우에 대한 예외명 수정
Kimprodp Aug 11, 2024
fef29f6
refactor: SectionNotFoundException의 로그 레벨 수정 (info -> warn)
Kimprodp Aug 11, 2024
bc28681
refactor: 사용하지 않는 메서드 삭제
Kimprodp Aug 11, 2024
d26b268
test: 가이드라인이 제공되지 않는 경우 테스트 추가
Kimprodp Aug 11, 2024
3092be1
test: 옵션 그룹에 없는 질문이 없는 경우 테스트 추가
Kimprodp Aug 11, 2024
892c73b
test: 섹션의 선택된 옵션이 필요없는 경우 테스트 추가
Kimprodp Aug 11, 2024
be6b8d5
refactor: long 타입 변경
Kimprodp Aug 11, 2024
d5c3b3d
Merge remote-tracking branch 'refs/remotes/origin/develop' into be/fe…
Kimprodp Aug 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package reviewme.template.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import reviewme.template.dto.response.TemplateResponse;
import reviewme.template.service.TemplateService;

@RestController
@RequiredArgsConstructor
public class TemplateController {

private final TemplateService templateService;

@GetMapping("/reviews/write")
Copy link
Contributor

Choose a reason for hiding this comment

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

기존 컨트롤러 지우면 프론트엔드가 간극이 있을 수 있으니 버전 업 하는 게 좋을 듯해요. v2 prefix를 들고가보는 건 어떨까요 /

Copy link
Contributor

Choose a reason for hiding this comment

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

(이미 반영되었네요)

public ResponseEntity<TemplateResponse> findReviewTemplate(@RequestParam String reviewRequestCode) {
TemplateResponse response = templateService.findDefaultTemplate();
return ResponseEntity.ok(response);
}
}