Skip to content

Commit

Permalink
Merge pull request #294 from boostcampwm2023/BE-FixPatchPostn-#292
Browse files Browse the repository at this point in the history
[BE/#292] 테이블 변경
  • Loading branch information
namewhat99 authored Dec 4, 2023
2 parents 635d221 + 55d5c11 commit dacddb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BE/src/entities/post.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class PostEntity {
price: number;

@Column({ type: 'text', nullable: false, charset: 'utf8' })
contents: string;
description: string;

@Column({ nullable: false })
user_id: number;
Expand Down
6 changes: 3 additions & 3 deletions BE/src/post/post.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class PostService {
return {
title: filteredPost.title,
price: filteredPost.price,
description: filteredPost.contents,
description: filteredPost.description,
post_id: filteredPost.id,
user_id: filteredPost.user.user_hash,
is_request: filteredPost.is_request,
Expand All @@ -117,7 +117,7 @@ export class PostService {
}
return {
title: post.title,
description: post.contents,
description: post.description,
price: post.price,
user_id: post.user.user_hash,
images: post.post_images.map((post_image) => post_image.image_url),
Expand Down Expand Up @@ -205,7 +205,7 @@ export class PostService {
where: { user_hash: userHash },
});
post.title = createPostDto.title;
post.contents = createPostDto.description;
post.description = createPostDto.description;
post.price = createPostDto.price;
post.is_request = createPostDto.is_request;
post.start_date = createPostDto.start_date;
Expand Down

0 comments on commit dacddb8

Please sign in to comment.