Skip to content

Commit

Permalink
Revert "[#21] 블랙 리스트 생성 및 삭제"
Browse files Browse the repository at this point in the history
  • Loading branch information
yanggwangseong authored Dec 7, 2024
1 parent 478d842 commit 54c9c12
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
18 changes: 0 additions & 18 deletions src/controllers/members.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import {
Param,
ParseIntPipe,
Patch,
Post,
UploadedFile,
UseInterceptors,
} from "@nestjs/common";
import { FileInterceptor } from "@nestjs/platform-express";
import * as bcrypt from "bcrypt";

import { CurrentMemberDecorator } from "@APP/common/decorators/current-member.decorator";
import { CreateBlackListDto } from "@APP/dtos/create-black-list.dto";
import { UpdateMemberDto } from "@APP/dtos/update-member.dto";
import { MembersService } from "@APP/services/members.service";

Expand All @@ -29,22 +27,6 @@ export class MembersController {
return this.membersService.findBlacks(currentMemberId);
}

@Post("blacks")
postBlack(
@CurrentMemberDecorator("id") currentMemberId: number,
@Body() dto: CreateBlackListDto,
) {
return this.membersService.createBlack(currentMemberId, dto.blackedId);
}

@Delete("blacks/:blackedId")
deleteBlack(
@CurrentMemberDecorator("id") currentMemberId: number,
@Param("blackedId", new ParseIntPipe()) blackedId: number,
) {
return this.membersService.deleteBlack(currentMemberId, blackedId);
}

@Get(":memberId")
getMember(@Param("memberId", new ParseIntPipe()) memberId: number) {
return this.membersService.findById(memberId);
Expand Down
7 changes: 0 additions & 7 deletions src/dtos/create-black-list.dto.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/services/members.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,4 @@ export class MembersService {
},
});
}

createBlack(blackerId: number, blackedId: number) {
return this.blackListRepository.save({
blackerId,
blackedId,
});
}

deleteBlack(blackerId: number, blackedId: number) {
return this.blackListRepository.delete({
blackerId,
blackedId,
});
}
}

0 comments on commit 54c9c12

Please sign in to comment.