Skip to content

Commit

Permalink
Merge pull request #60 from Mu-necting/fix/#58
Browse files Browse the repository at this point in the history
회원 탈퇴 엔드포인트 수정 완료
  • Loading branch information
mingmingmon authored Nov 10, 2024
2 parents f3ea079 + d0eb60c commit e89f250
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ public ApiResponse<?> test(
return ApiResponse.onSuccess(Status.OK.getCode(), Status.OK.getMessage(), userId);
}

//TODO: 엔드포인트에 userId 노출 제거
@DeleteMapping("/{userId}")
@DeleteMapping("/me")
@Operation(summary = "회원 탈퇴")
public ApiResponse<?> deleteUser(
@PathVariable(name = "userId") Long userId
@UserId Long userId
) {
userService.deleteUser(userId);
return ApiResponse.onSuccess(Status.OK.getCode(), Status.OK.getMessage(), null);
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions src/main/java/com/munecting/api/global/config/WebConfig.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.munecting.api.global.config;

import com.munecting.api.global.auth.interceptor.UserAuthorizationInterceptor;
import com.munecting.api.global.auth.resolver.UserIdArgumentResolver;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

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

private final UserIdArgumentResolver userIdArgumentResolver;
private final UserAuthorizationInterceptor userAuthorizationInterceptor;

@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
resolvers.add(userIdArgumentResolver);
}

@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(userAuthorizationInterceptor)
.addPathPatterns("/api/users/{userId}");
}
}

0 comments on commit e89f250

Please sign in to comment.