Skip to content

Commit e89f250

Browse files
authored
Merge pull request #60 from Mu-necting/fix/#58
회원 탈퇴 엔드포인트 수정 완료
2 parents f3ea079 + d0eb60c commit e89f250

File tree

3 files changed

+2
-84
lines changed

3 files changed

+2
-84
lines changed

src/main/java/com/munecting/api/domain/user/controller/UserController.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,10 @@ public ApiResponse<?> test(
3636
return ApiResponse.onSuccess(Status.OK.getCode(), Status.OK.getMessage(), userId);
3737
}
3838

39-
//TODO: 엔드포인트에 userId 노출 제거
40-
@DeleteMapping("/{userId}")
39+
@DeleteMapping("/me")
4140
@Operation(summary = "회원 탈퇴")
4241
public ApiResponse<?> deleteUser(
43-
@PathVariable(name = "userId") Long userId
42+
@UserId Long userId
4443
) {
4544
userService.deleteUser(userId);
4645
return ApiResponse.onSuccess(Status.OK.getCode(), Status.OK.getMessage(), null);

src/main/java/com/munecting/api/global/auth/interceptor/UserAuthorizationInterceptor.java

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
package com.munecting.api.global.config;
22

3-
import com.munecting.api.global.auth.interceptor.UserAuthorizationInterceptor;
43
import com.munecting.api.global.auth.resolver.UserIdArgumentResolver;
54
import lombok.RequiredArgsConstructor;
65
import org.springframework.context.annotation.Configuration;
76
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
8-
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
97
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
108

119
import java.util.List;
@@ -15,16 +13,9 @@
1513
public class WebConfig implements WebMvcConfigurer {
1614

1715
private final UserIdArgumentResolver userIdArgumentResolver;
18-
private final UserAuthorizationInterceptor userAuthorizationInterceptor;
1916

2017
@Override
2118
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
2219
resolvers.add(userIdArgumentResolver);
2320
}
24-
25-
@Override
26-
public void addInterceptors(InterceptorRegistry registry) {
27-
registry.addInterceptor(userAuthorizationInterceptor)
28-
.addPathPatterns("/api/users/{userId}");
29-
}
3021
}

0 commit comments

Comments
 (0)