Skip to content

Commit

Permalink
[BE] Feat : 배열 형식으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
koomin1227 committed Dec 9, 2023
1 parent 5feb97b commit b8b751e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions BE/src/post/post.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ export class PostService {
post.end_date = createPostDto.end_date;
post.user_hash = userHash;
post.thumbnail = imageLocations.length > 0 ? imageLocations[0] : null;
// 이미지 추가
const res = await this.postRepository.save(post);
if (res.is_request === false) {
await this.createImages(imageLocations, res.id);
Expand Down Expand Up @@ -258,8 +257,6 @@ export class PostService {
},
});
const titles: string[] = posts.map((post) => post.title);
return {
titles: titles.slice(0, 5),
};
return titles.slice(0, 5);
}
}

0 comments on commit b8b751e

Please sign in to comment.