Skip to content

Commit

Permalink
refactor : 파라미터 필수 해제 및 조회수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
MyunghyunNero committed Nov 18, 2023
1 parent d7784b3 commit d0ad785
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public ResponseEntity<BaseResponse<ProgramPageMainRes>> findProgramsByProgramNam
public ResponseEntity<BaseResponse<ProgramPageMainRes>> findProgramsByFilter(

@Parameter(description = "프로그램 이름", example = "이름")
@RequestParam(value = "programName")
@RequestParam(value = "programName" , required = false)
String programName,

@Parameter(description = "정렬 기준", example = "최신순, 인기순 , 빠른마감순,늦은마감순")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public List<ProgramMapRes> getProgramsMap(){
@Override
public ProgramDetailRes getProgramDetail(Long id){
Program program = programRespository.findById(id).orElse(null);
program.setViewCount(program.getViewCount()+1);
if(program == null) {
throw new BaseException(BaseResponseStatus.BAD_REQUEST);
}else{
Expand Down

0 comments on commit d0ad785

Please sign in to comment.