Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/modules/chatRoom/chatRoom.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ export default class ChatRoomService {
return chatData;
}

@Transactional()
async deActive(planId: string): Promise<void> {
const chatRoom = await this.getChatRoomDomain({ planId });
chatRoom.update();
await this.chatRoomRepository.update(chatRoom);
const chatRoom = await this.chatRoomRepository.findChatRoom({ planId });
//NOTE. 일단 임시로 트랜젝션을 제외
if (chatRoom) {
chatRoom.update();
await this.chatRoomRepository.update(chatRoom);
} //NOTE. 채팅방 목데이터가 없어서 나는 에러 처리
}

async deActiveMany(planIds: string[]): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/plan/plan.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ export default class PlanService {
plan.updateComplete();
const updatedPlan = await this.repository.update(plan);
const planId = plan.getId();
await this.chatRoomService.deActive(planId);

await this.chatRoomService.deActive(planId);
await this.pointQueue.add('points', {
userId: plan.getConfirmedMakerId(),
event: PointEventEnum.EARN,
Expand Down