Skip to content

Commit 1c68c4e

Browse files
authored
[fix/#225] 기록 내용 필수 사항 제거 (#226)
* fix: 수정 * Revert "fix: 수정" This reverts commit f1a4d71. * fix : 기록 내용 필 수 제거 --------- Co-authored-by: 나용준 <141994188+youngJun99@users.noreply.github.com>
1 parent 8d701db commit 1c68c4e

4 files changed

Lines changed: 1 addition & 34 deletions

File tree

clokey-api/src/main/java/org/clokey/domain/cloth/service/ClothServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,4 @@ private void validateChildCategory(Category category) {
244244
throw new BaseCustomException(ClothErrorCode.PARENT_CATEGORY_CLOTH);
245245
}
246246
}
247-
}
247+
}

clokey-api/src/main/java/org/clokey/domain/history/dto/request/HistoryCreateRequest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
@Schema(description = "기록 생성 요청")
1010
public record HistoryCreateRequest(
1111
@Size(max = 120, message = "기록의 내용은 최대 120자까지 가능합니다.")
12-
@NotBlank(message = "기록의 내용은 비워둘 수 없습니다.")
1312
@Schema(
1413
description = "기록의 내용",
1514
example = "안녕 오늘 오지게 덥다 ㄷㄷ;; 근데 한달 뒤면 가을임 벌써 가을 기대 만발ㅋ")

clokey-api/src/test/java/org/clokey/domain/history/controller/HistoryControllerTest.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -82,37 +82,6 @@ class 기록_생성_요청_시 {
8282
.andExpect(jsonPath("$.result.historyId").value(1L));
8383
}
8484

85-
@ParameterizedTest
86-
@NullSource
87-
@EmptySource
88-
@ValueSource(strings = {" "})
89-
void 내용이_null_또는_공백이면_예외가_발생한다(String content) throws Exception {
90-
HistoryCreateRequest request =
91-
new HistoryCreateRequest(
92-
content,
93-
1L,
94-
List.of(1L, 2L),
95-
List.of("testHashtag1", "testHashtag2"),
96-
List.of(
97-
new HistoryCreateRequest.Payload(
98-
"testUrl",
99-
List.of(
100-
new HistoryCreateRequest.ClothTag(
101-
1L, 0.42, 0.73)))));
102-
103-
ResultActions perform =
104-
mockMvc.perform(
105-
post("/histories")
106-
.contentType(MediaType.APPLICATION_JSON)
107-
.content(objectMapper.writeValueAsString(request)));
108-
109-
perform.andExpect(status().isBadRequest())
110-
.andExpect(jsonPath("$.isSuccess").value(false))
111-
.andExpect(jsonPath("$.code").value("COMMON400"))
112-
.andExpect(jsonPath("$.message").value("잘못된 요청입니다."))
113-
.andExpect(jsonPath("$.result.content").value("기록의 내용은 비워둘 수 없습니다."));
114-
}
115-
11685
@Test
11786
void 내용이_120자를_초과하면_예외가_발생한다() throws Exception {
11887
String longContent = "a".repeat(121);

clokey-infrastructure/src/main/java/org/clokey/util/S3Util.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.amazonaws.HttpMethod;
44
import com.amazonaws.SdkClientException;
55
import com.amazonaws.services.s3.AmazonS3;
6-
import com.amazonaws.services.s3.Headers;
76
import com.amazonaws.services.s3.model.*;
87
import java.util.Date;
98
import java.util.List;

0 commit comments

Comments
 (0)