Skip to content

Commit 754b222

Browse files
committed
imageUrl 이름 수정
1 parent e467f0a commit 754b222

6 files changed

+11
-11
lines changed

src/post-image/post-image.service.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class PostImageService {
2626

2727
const postImageEntities = postImages.map((image: UploadImageDto) => {
2828
return this.postImageRepository.create({
29-
url: image.imageurl,
29+
url: image.imageUrl,
3030
orderNum: image.orderNum,
3131
post: post,
3232
});
@@ -56,7 +56,7 @@ export class PostImageService {
5656
const imagesToRemove = existingImages.filter(
5757
(existingImage) =>
5858
existingImage.status === 'activated' &&
59-
!postImages.some((newImage) => newImage.imageurl === existingImage.url),
59+
!postImages.some((newImage) => newImage.imageUrl === existingImage.url),
6060
);
6161

6262
// 이미지 삭제
@@ -65,9 +65,9 @@ export class PostImageService {
6565
// 새 이미지 추가
6666
await Promise.all(
6767
postImages.map(async (newImage) => {
68-
if (existingImageUrls.has(newImage.imageurl)) {
68+
if (existingImageUrls.has(newImage.imageUrl)) {
6969
const existingImage = existingImages.find(
70-
(image) => image.url === newImage.imageurl,
70+
(image) => image.url === newImage.imageUrl,
7171
);
7272

7373
// 기존 이미지의 orderNum이 수정된 경우
@@ -78,7 +78,7 @@ export class PostImageService {
7878
} else {
7979
// 새로운 이미지 저장
8080
const newPostImage = this.postImageRepository.create({
81-
url: newImage.imageurl,
81+
url: newImage.imageUrl,
8282
orderNum: newImage.orderNum,
8383
post,
8484
});

src/post/dtos/get-post.dto.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class PostImageDto {
55
example: 'http://example.com/image.jpg',
66
description: '게시물 이미지 URL',
77
})
8-
url: string;
8+
imageUrl: string;
99

1010
@ApiProperty({
1111
example: 1,

src/post/dtos/post.request.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class UploadImageDto {
1616
description: '업로드할 이미지의 URL입니다.',
1717
})
1818
@IsString()
19-
imageurl: string;
19+
imageUrl: string;
2020

2121
@ApiProperty({ example: 1, description: '이미지의 순서 번호입니다.' })
2222
@IsNumber()

src/post/dtos/post.response.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class PostImageDto {
77
example: 'http://example.com/image.jpg',
88
description: '게시물 이미지 URL',
99
})
10-
url: string;
10+
imageUrl: string;
1111

1212
@ApiProperty({
1313
example: 1,

src/post/post.controller.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class PostController {
141141
isRepresentative: post.isRepresentative,
142142
postStyletags: post.postStyletags?.map((tag) => tag.styletag.tag),
143143
postImages: post.postImages.map((image) => ({
144-
url: image.url,
144+
imageUrl: image.url,
145145
orderNum: image.orderNum,
146146
})),
147147
postClothings: post.postClothings.map((postClothing) => ({
@@ -183,7 +183,7 @@ export class PostController {
183183
isRepresentative: updatedPost.isRepresentative,
184184
postStyletags: post.postStyletags?.map((tag) => tag.styletag.tag),
185185
postImages: updatedPost.postImages.map((image) => ({
186-
url: image.url,
186+
imageUrl: image.url,
187187
orderNum: image.orderNum,
188188
})),
189189
postClothings: updatedPost.postClothings.map((postClothing) => ({

src/post/post.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ export class PostService {
444444
isRepresentative: post.isRepresentative,
445445
postStyletags: post.postStyletags?.map((tag) => tag.styletag.tag),
446446
postImages: post.postImages.map((image) => ({
447-
url: image.url,
447+
imageUrl: image.url,
448448
orderNum: image.orderNum,
449449
})),
450450
postClothings: post.postClothings.map((postClothing) => ({

0 commit comments

Comments
 (0)