Skip to content

Commit 7868df7

Browse files
committed
feat: BasicChannelService의 delete 빠진 로직 추가
1 parent ac274c9 commit 7868df7

File tree

5 files changed

+27
-2
lines changed

5 files changed

+27
-2
lines changed

HELP.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Getting Started
2+
3+
### Reference Documentation
4+
For further reference, please consider the following sections:
5+
6+
* [Official Gradle documentation](https://docs.gradle.org)
7+
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/3.4.4/gradle-plugin)
8+
* [Create an OCI image](https://docs.spring.io/spring-boot/3.4.4/gradle-plugin/packaging-oci-image.html)
9+
* [Spring Web](https://docs.spring.io/spring-boot/3.4.4/reference/web/servlet.html)
10+
11+
### Guides
12+
The following guides illustrate how to use some features concretely:
13+
14+
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
15+
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
16+
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
17+
18+
### Additional Links
19+
These additional references should also help you:
20+
21+
* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)
22+
Binary file not shown.
Binary file not shown.

src/main/java/com/sprint/mission/discodeit/service/basic/BasicChannelService.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ public Channel update(UUID id, Channel update) {
5555
@Override
5656
public boolean delete(UUID id, User user, String password) {
5757
Channel channel = channelRepository.read(id);
58-
if (channel == null) {
59-
throw new IllegalArgumentException(" --해당 채널을 찾을 수 없습니다.");
58+
if (!user.getPassword().equals(password)) {
59+
System.out.println("!!채널 삭제 실패!! --- 비밀번호 불일치");
60+
return false;
6061
}
62+
System.out.println("<<채널 [" + channel.getChannelName() + "] 삭제 성공>>");
63+
6164
return channelRepository.delete(id, user, password);
6265
}
6366

Binary file not shown.

0 commit comments

Comments
 (0)