Skip to content

Commit

Permalink
Merge pull request #95 from Team-Growthook/fix/#94-firstSprintQA-FIX
Browse files Browse the repository at this point in the history
[FIX]1차 스프린트 클라QA요청 사항 반영
  • Loading branch information
Hong0329 authored Mar 19, 2024
2 parents 1a5ff26 + 6967c0f commit b211d1c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ public class SeedCreateRequestDto {
@Size(max = 300)
private String memo;

@NotBlank
@Size(max = 20)
private String source;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class SeedUpdateRequestDto {
@Size(max = 300)
private String memo;

@NotBlank
@Size(max = 20)
private String source;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import java.time.Clock;
import java.util.List;
import java.util.stream.Collectors;

import com.example.growthookserver.common.exception.BadRequestException;
import com.example.growthookserver.common.response.ErrorStatus;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down Expand Up @@ -125,10 +128,12 @@ public SeedAlarmGetResponseDto getSeedAlarm(Long memberId) {
@Transactional
public void unlockSeed(Long seedId) {
Seed seed = seedRepository.findSeedByIdOrThrow(seedId);
seed.unlockSeed();
Member member = memberRepository.findMemberByIdOrThrow(seed.getMemberId());

Long memberId = seed.getMemberId();
Member member = memberRepository.findMemberByIdOrThrow(memberId);
if(member.getGatheredSsuk()==0)
throw new BadRequestException(ErrorStatus.USER_GATHEREDSSUK_ZERO.getMessage());

seed.unlockSeed();
member.useSsuck();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public enum ErrorStatus {
INVALID_MEMBER("유효하지 않은 유저입니다."),
ANOTHER_ACCESS_TOKEN("지원하지 않는 소셜 플랫폼입니다."),
ALREADY_COMPLETE_ACTIONPLAN("이미 완료된 액션 플랜입니다."),
USER_GATHEREDSSUK_ZERO("해당 유저의 쑥이 0개입니다."),

/**
* 401 UNAUTHORIZED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class SlackService {
String slackToken;

public void sendSlackMessage(String userName, Long totalMember, String channel) {
String message = userName +"님은 " + totalMember.toString() + "번째 쑥쑥이에어 곰이 됐어요.";
String message = userName +"님은 " + totalMember.toString() + "번째 쑥쑥이에서 곰이 됐어요.";
try {
MethodsClient methods = Slack.getInstance().methods(slackToken);

Expand Down

0 comments on commit b211d1c

Please sign in to comment.