Skip to content

Commit

Permalink
[#75] 모임 게시글 삭제시 해당 정보만 삭제하도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
rdd9223 committed Oct 2, 2023
1 parent 6bae04f commit 89e274a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion server/src/meeting/v0/meeting-v0.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { MeetingV0GetApplyListByMeetingResponseDto } from './dto/get-apply-list-
import { MeetingV0GetAllMeetingsResponseDto } from './dto/get-all-meetings/meeting-v0-get-all-meetings-response.dto';
import { GetUser } from 'src/common/decorator/get-user.decorator';
import { ApiOkResponseCommon } from 'src/common/decorator/api-ok-response-common.decorator';
import { Apply } from 'src/entity/apply/apply.entity';

@ApiTags('모임')
@Controller('meeting')
Expand Down
1 change: 0 additions & 1 deletion server/src/meeting/v1/meeting-v1.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
Body,
Controller,
Get,
HttpCode,
HttpStatus,
Param,
ParseIntPipe,
Expand Down
11 changes: 1 addition & 10 deletions server/src/post/v1/post-v1.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,6 @@ export class PostV1Service {
throw new ForbiddenException('권한이 없습니다.');
}

const transaction = await this.postRepository.getTransaction();
await transaction.transaction(async (manager) => {
await manager.delete('Like', { postId });
await manager.decrement(
'Meeting',
{ id: post.meetingId },
'postCount',
1,
);
});
await this.postRepository.delete({ id: postId });
}
}

0 comments on commit 89e274a

Please sign in to comment.