Skip to content

Commit

Permalink
[feat] soptLevel과 플그 정보 추가 메소드 (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlarlgnszx committed Nov 22, 2024
1 parent a463d50 commit 4dc67dc
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.sopt.app.common.exception.BadRequestException;
import org.sopt.app.common.exception.UnauthorizedException;
import org.sopt.app.common.response.ErrorCode;
import org.sopt.app.domain.entity.User;
import org.sopt.app.domain.enums.UserStatus;
import org.sopt.app.presentation.auth.AppAuthRequest.AccessTokenRequest;
import org.sopt.app.presentation.auth.AppAuthRequest.CodeRequest;
Expand Down Expand Up @@ -239,4 +240,15 @@ private <T extends PostWithMemberInfo> List<T> getPostsWithMemberInfo(String pla
}
return mutablePosts;
}

public int getUserSoptLevel(User user) {
final Map<String, String> accessToken = createAuthorizationHeaderByUserPlaygroundToken(user.getPlaygroundToken());
return playgroundClient.getPlayGroundUserSoptLevel(accessToken,user.getPlaygroundId()).soptProjectCount();
}

public PlaygroundProfile getPlayGroundProfile(String accessToken) {
Map<String, String> requestHeader = createAuthorizationHeaderByUserPlaygroundToken(accessToken);
return playgroundClient.getPlayGroundProfile(requestHeader);

}
}

0 comments on commit 4dc67dc

Please sign in to comment.