Skip to content

Commit

Permalink
Merge pull request #120 from Modagbul/hotfix
Browse files Browse the repository at this point in the history
소모임장 조회
  • Loading branch information
seungueonn authored Dec 8, 2023
2 parents 994bfe5 + ee025b9 commit 91b2975
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,13 @@ public MissionRecommendRes getCategoryByTeam(Long teamId) {
.build();
}


public Boolean getIsLeader(String socialId, Long teamId) {
Member member = memberGetService.getMemberBySocialId(socialId);
Team team = teamGetService.getTeamByTeamId(teamId);

return member.getMemberId().equals(team.getLeaderId());

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,16 @@ public ResponseEntity<SuccessResponse<Long>> deleteMission(@AuthenticationPrinci
public ResponseEntity<SuccessResponse<String>> recommendMission(@AuthenticationPrincipal User user,@PathVariable Long teamId) {
return ResponseEntity.ok(SuccessResponse.create(RECOMMEND_MISSION_SUCCESS.getMessage(), this.missionReadUseCase.getTeamCategory(teamId)));
}
/**
* 미션 추천
* [GET] {teamId}/missions/isLeader
* 작성자 : 정승연
*/


@GetMapping("/isLeader")
public ResponseEntity<SuccessResponse<Boolean>> isLeader(@AuthenticationPrincipal User user,@PathVariable Long teamId) {
return ResponseEntity.ok(SuccessResponse.create(RECOMMEND_MISSION_SUCCESS.getMessage(), this.missionCreateUseCase.getIsLeader(user.getSocialId(),teamId)));
}



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public class MissionArchiveReq {

private String status;
@Size(min = 1, max = 4000)
@Size(min = 1, max = 1000)
private String archive; //사진일 경우 파일명, 이외에는 text,link

@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class MissionArchive extends BaseTimeEntity { // 1회 미션을 저장
@Enumerated(value = EnumType.STRING)
private MissionArchiveStatus status;

@Column(nullable = false, length = 4000)
@Column(nullable = false, columnDefinition="TEXT", length = 4000)
private String archive; //링크, 글, 사진 뭐든 가능

private Long count; // 횟수
Expand Down

0 comments on commit 91b2975

Please sign in to comment.