-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: 이미지 업로드 request body 삭제 * test: s3 관련 테스트 수정
- Loading branch information
Showing
9 changed files
with
60 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 13 additions & 3 deletions
16
lovebird-api/src/main/kotlin/com/lovebird/api/dto/param/external/ProfileImageUploadParam.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
package com.lovebird.api.dto.param.external | ||
|
||
import com.lovebird.common.enums.Domain | ||
import org.springframework.web.multipart.MultipartFile | ||
|
||
data class ProfileImageUploadParam( | ||
val image: MultipartFile, | ||
val domain: String, | ||
val providerId: String | ||
) | ||
val domain: String | ||
) { | ||
companion object { | ||
|
||
fun from(image: MultipartFile): ProfileImageUploadParam { | ||
return ProfileImageUploadParam( | ||
image = image, | ||
domain = Domain.PROFILE.lower() | ||
) | ||
} | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
...rd-api/src/main/kotlin/com/lovebird/api/dto/request/external/ProfileImageUploadRequest.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -947,8 +947,7 @@ <h4 id="_프로필_이미지_업로드_curl_request"><a class="link" href="#_프 | |
<div class="content"> | ||
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ curl 'http://localhost:8080/api/v1/images/profile' -i -X POST \ | ||
-H 'Content-Type: application/json;charset=UTF-8' \ | ||
-F '[email protected];type=image/png' \ | ||
-F 'imageUploadRequest={"providerId":"provider-id"};type=application/json'</code></pre> | ||
-F '[email protected];type=image/png'</code></pre> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -965,11 +964,6 @@ <h4 id="_프로필_이미지_업로드_http_request"><a class="link" href="#_프 | |
Content-Type: image/png | ||
|
||
image | ||
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm | ||
Content-Disposition: form-data; name=imageUploadRequest | ||
Content-Type: application/json | ||
|
||
{"providerId":"provider-id"} | ||
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--</code></pre> | ||
</div> | ||
</div> | ||
|
@@ -999,8 +993,7 @@ <h4 id="_프로필_이미지_업로드_httpie_request"><a class="link" href="#_ | |
<div class="content"> | ||
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ http --multipart POST 'http://localhost:8080/api/v1/images/profile' \ | ||
'Content-Type:application/json;charset=UTF-8' \ | ||
'image'@'image.png' \ | ||
'imageUploadRequest'='{"providerId":"provider-id"}'</code></pre> | ||
'image'@'image.png'</code></pre> | ||
</div> | ||
</div> | ||
</div> | ||
|
@@ -1013,31 +1006,7 @@ <h4 id="_프로필_이미지_업로드_request_body"><a class="link" href="#_프 | |
</div> | ||
</div> | ||
<div class="sect3"> | ||
<h4 id="_프로필_이미지_업로드_request_part-imageUploadRequest-fields"><a class="link" href="#_프로필_이미지_업로드_request_part-imageUploadRequest-fields">5.1.6. Request part-imageuploadrequest-fields</a></h4> | ||
<table class="tableblock frame-all grid-all stretch"> | ||
<colgroup> | ||
<col style="width: 33.3333%;"> | ||
<col style="width: 33.3333%;"> | ||
<col style="width: 33.3334%;"> | ||
</colgroup> | ||
<thead> | ||
<tr> | ||
<th class="tableblock halign-left valign-top">Path</th> | ||
<th class="tableblock halign-left valign-top">Type</th> | ||
<th class="tableblock halign-left valign-top">Description</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>providerId</code></p></td> | ||
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>com.lovebird.api.utils.restdocs.STRING@308af0df</code></p></td> | ||
<td class="tableblock halign-left valign-top"><p class="tableblock">소셜 제공자 ID</p></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<div class="sect3"> | ||
<h4 id="_프로필_이미지_업로드_response_body"><a class="link" href="#_프로필_이미지_업로드_response_body">5.1.7. Response body</a></h4> | ||
<h4 id="_프로필_이미지_업로드_response_body"><a class="link" href="#_프로필_이미지_업로드_response_body">5.1.6. Response body</a></h4> | ||
<div class="listingblock"> | ||
<div class="content"> | ||
<pre class="highlightjs highlight nowrap"><code class="language-json hljs" data-lang="json">{ | ||
|
@@ -1052,7 +1021,7 @@ <h4 id="_프로필_이미지_업로드_response_body"><a class="link" href="#_ | |
</div> | ||
</div> | ||
<div class="sect3"> | ||
<h4 id="_프로필_이미지_업로드_response_fields"><a class="link" href="#_프로필_이미지_업로드_response_fields">5.1.8. Response fields</a></h4> | ||
<h4 id="_프로필_이미지_업로드_response_fields"><a class="link" href="#_프로필_이미지_업로드_response_fields">5.1.7. Response fields</a></h4> | ||
<table class="tableblock frame-all grid-all stretch"> | ||
<colgroup> | ||
<col style="width: 33.3333%;"> | ||
|
@@ -2549,8 +2518,8 @@ <h5 id="_success_7_http_response"><a class="link" href="#_success_7_http_respons | |
"nickname" : "test", | ||
"partnerNickname" : "test2", | ||
"firstDate" : "2024-01-01", | ||
"birthday" : "2024-03-17", | ||
"partnerBirthday" : "2024-03-17", | ||
"birthday" : "2024-03-19", | ||
"partnerBirthday" : "2024-03-19", | ||
"dayCount" : 48, | ||
"nextAnniversary" : { | ||
"kind" : "DAY", | ||
|
@@ -2712,8 +2681,8 @@ <h4 id="_수정_http_request"><a class="link" href="#_수정_http_request">7.2.1 | |
"imageUrl" : "test-image-url", | ||
"email" : "test-email", | ||
"nickname" : "test-nickname", | ||
"birthday" : "2024-03-17", | ||
"firstDate" : "2024-03-17", | ||
"birthday" : "2024-03-19", | ||
"firstDate" : "2024-03-19", | ||
"gender" : "UNKNOWN" | ||
}</code></pre> | ||
</div> | ||
|
@@ -4105,7 +4074,7 @@ <h3 id="_데이트_날짜_기준_다이어리_조회"><a class="link" href="#_ | |
<h4 id="_데이트_날짜_기준_다이어리_조회_http_request"><a class="link" href="#_데이트_날짜_기준_다이어리_조회_http_request">10.2.1. HTTP request</a></h4> | ||
<div class="listingblock"> | ||
<div class="content"> | ||
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/memory-date?memoryDate=2024-03-17 HTTP/1.1 | ||
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/memory-date?memoryDate=2024-03-19 HTTP/1.1 | ||
Authorization: Bearer access-token | ||
Host: localhost:8080</code></pre> | ||
</div> | ||
|
@@ -4169,39 +4138,39 @@ <h4 id="_데이트_날짜_기준_다이어리_조회_http_response"><a class="li | |
"diaryId" : 1, | ||
"userId" : 1, | ||
"title" : "제목1", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소1", | ||
"content" : "내용1", | ||
"imageUrls" : [ "imageURL1" ] | ||
}, { | ||
"diaryId" : 2, | ||
"userId" : 1, | ||
"title" : "제목2", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소2", | ||
"content" : "내용2", | ||
"imageUrls" : [ "imageURL2" ] | ||
}, { | ||
"diaryId" : 3, | ||
"userId" : 1, | ||
"title" : "제목3", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소3", | ||
"content" : "내용3", | ||
"imageUrls" : [ "imageURL3" ] | ||
}, { | ||
"diaryId" : 4, | ||
"userId" : 1, | ||
"title" : "제목4", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소4", | ||
"content" : "내용4", | ||
"imageUrls" : [ "imageURL4" ] | ||
}, { | ||
"diaryId" : 5, | ||
"userId" : 1, | ||
"title" : "제목5", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소5", | ||
"content" : "내용5", | ||
"imageUrls" : [ "imageURL5" ] | ||
|
@@ -4298,7 +4267,7 @@ <h3 id="_커서_기반_다이어리_리스트_조회"><a class="link" href="#_ | |
<h4 id="_커서_기반_다이어리_리스트_조회_http_request"><a class="link" href="#_커서_기반_다이어리_리스트_조회_http_request">10.3.1. HTTP request</a></h4> | ||
<div class="listingblock"> | ||
<div class="content"> | ||
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/cursor?memoryDate=2024-03-17&searchType=BEFORE&diaryId=-1&pageSize=10 HTTP/1.1 | ||
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /api/v1/diaries/cursor?memoryDate=2024-03-19&searchType=BEFORE&diaryId=-1&pageSize=10 HTTP/1.1 | ||
Authorization: Bearer access-token | ||
Host: localhost:8080</code></pre> | ||
</div> | ||
|
@@ -4374,86 +4343,86 @@ <h4 id="_커서_기반_다이어리_리스트_조회_http_response"><a class="li | |
"diaryId" : 1, | ||
"userId" : 1, | ||
"title" : "제목1", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용1", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 2, | ||
"userId" : 2, | ||
"title" : "제목2", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용2", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 3, | ||
"userId" : 3, | ||
"title" : "제목3", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용3", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 4, | ||
"userId" : 4, | ||
"title" : "제목4", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용4", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 5, | ||
"userId" : 5, | ||
"title" : "제목5", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용5", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 6, | ||
"userId" : 6, | ||
"title" : "제목6", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용6", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 7, | ||
"userId" : 7, | ||
"title" : "제목7", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용7", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 8, | ||
"userId" : 8, | ||
"title" : "제목8", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용8", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 9, | ||
"userId" : 9, | ||
"title" : "제목9", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용9", | ||
"imageUrls" : [ ] | ||
}, { | ||
"diaryId" : 10, | ||
"userId" : 10, | ||
"title" : "제목10", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : null, | ||
"content" : "내용10", | ||
"imageUrls" : [ ] | ||
} ], | ||
"totalCount" : 10, | ||
"diaryId" : 10, | ||
"memoryDate" : "2024-03-17" | ||
"memoryDate" : "2024-03-19" | ||
} | ||
}</code></pre> | ||
</div> | ||
|
@@ -4575,7 +4544,7 @@ <h4 id="_다이어리_상세_조회_http_response"><a class="link" href="#_다 | |
"diaryId" : 1, | ||
"userId" : 1, | ||
"title" : "다이어리 제목", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소", | ||
"content" : "내용", | ||
"imageUrls" : [ ] | ||
|
@@ -4668,7 +4637,7 @@ <h4 id="_다이어리_생성_http_request"><a class="link" href="#_다이어리_ | |
|
||
{ | ||
"title" : "다이어리 제목", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소", | ||
"content" : "내용", | ||
"imageUrls" : [ "imageUrl1", "imageUrl2" ] | ||
|
@@ -4682,7 +4651,7 @@ <h4 id="_다이어리_생성_request_body"><a class="link" href="#_다이어리_ | |
<div class="content"> | ||
<pre class="highlightjs highlight nowrap"><code class="language-json hljs" data-lang="json">{ | ||
"title" : "다이어리 제목", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소", | ||
"content" : "내용", | ||
"imageUrls" : [ "imageUrl1", "imageUrl2" ] | ||
|
@@ -4819,7 +4788,7 @@ <h4 id="_다이어리_수정_http_request"><a class="link" href="#_다이어리_ | |
|
||
{ | ||
"title" : "다이어리 제목 수정", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소", | ||
"content" : "내용 수정", | ||
"imageUrls" : [ "imageUrl1", "imageUrl2" ] | ||
|
@@ -4833,7 +4802,7 @@ <h4 id="_다이어리_수정_request_body"><a class="link" href="#_다이어리_ | |
<div class="content"> | ||
<pre class="highlightjs highlight nowrap"><code class="language-json hljs" data-lang="json">{ | ||
"title" : "다이어리 제목 수정", | ||
"memoryDate" : "2024-03-17", | ||
"memoryDate" : "2024-03-19", | ||
"place" : "장소", | ||
"content" : "내용 수정", | ||
"imageUrls" : [ "imageUrl1", "imageUrl2" ] | ||
|
@@ -5016,7 +4985,7 @@ <h4 id="_다이어리_삭제_response_fields"><a class="link" href="#_다이어 | |
<div id="footer"> | ||
<div id="footer-text"> | ||
Version 1.1.0-SNAPSHOT<br> | ||
Last updated 2024-03-17 15:12:32 +0900 | ||
Last updated 2024-03-18 09:38:38 +0900 | ||
</div> | ||
</div> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script> | ||
|
Oops, something went wrong.