-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: core:network -> remote:common #137
Conversation
Walkthrough์ ์ฒด์ ์ธ ๋ณ๊ฒฝ์ Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Outside diff range and nitpick comments (1)
remote/common/src/main/java/com/suwiki/remote/common/authenticator/TokenAuthenticator.kt (1)
Line range hint
1-42
: ํ ํฐ ์ธ์ฆ ํด๋์ค๋ ๋ง๋ฃ๋ ํ ํฐ์ ์ ์ ํ ๊ฐ์งํ๊ณ ์๋ก๊ณ ์นจ์ ์๋ํฉ๋๋ค. ์ฝ๋ฃจํด๊ณผ ๋ฎคํ ์ค๋ฅผ ์ฌ์ฉํ ์ค๋ ๋ ์์ ์ฑ ์ฒ๋ฆฌ๋ ํ๋ฅญํฉ๋๋ค. ํ์ง๋ง, ๋ก๊น ๋ฉ์์ง๋ฅผ ์ข ๋ ๋ช ํํ๊ฒ ํํํ ํ์๊ฐ ์์ต๋๋ค.- .d("TokenAuthenticator - ์ด๋ฏธ ํ ํฐ์ด ๊ฐฑ์ ๋จ / ์ค๋จ๋ API ์ฌ์์ฒญ") + .d("TokenAuthenticator - ํ ํฐ์ด ์ด๋ฏธ ๊ฐฑ์ ๋์ด ์ค๋จ๋ API๋ฅผ ์ฌ์์ฒญํฉ๋๋ค.")
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (44)
- build-logic/convention/src/main/java/RemoteConventionPlugin.kt (1 hunks)
- gradle/libs.versions.toml (2 hunks)
- remote/common/build.gradle.kts (2 hunks)
- remote/common/src/main/AndroidManifest.xml (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/api/AuthApi.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/authenticator/TokenAuthenticator.kt (3 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/di/ApiModule.kt (2 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/di/Consts.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/di/NetworkModule.kt (3 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/di/Qualifier.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/di/RepositoryModule.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/interceptor/AuthenticationInterceptor.kt (2 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/model/TokenResponse.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/repository/AuthRepository.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/repository/AuthRepositoryImpl.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/ApiResult.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/ApiResultCallAdapter.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/Json.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/ResultCallAdapterFactory.kt (1 hunks)
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/SuwikiErrorResponse.kt (1 hunks)
- remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/api/ExamEditorApi.kt (1 hunks)
- remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/api/LectureEditorApi.kt (1 hunks)
- remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/di/ApiModule.kt (1 hunks)
- remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/api/ExamMyApi.kt (1 hunks)
- remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/api/LectureMyApi.kt (1 hunks)
- remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/di/ApiModule.kt (1 hunks)
- remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamReportApi.kt (1 hunks)
- remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamViewerApi.kt (1 hunks)
- remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureReportApi.kt (1 hunks)
- remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureViewerApi.kt (1 hunks)
- remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt (1 hunks)
- remote/login/src/main/java/com/suwiki/remote/login/api/LoginApi.kt (1 hunks)
- remote/login/src/main/java/com/suwiki/remote/login/di/ApiModule.kt (1 hunks)
- remote/notice/src/main/java/com/suwiki/remote/notice/api/NoticeApi.kt (1 hunks)
- remote/notice/src/main/java/com/suwiki/remote/notice/di/ApiModule.kt (2 hunks)
- remote/openmajor/src/main/java/com/suwiki/remote/openmajor/api/MajorApi.kt (1 hunks)
- remote/openmajor/src/main/java/com/suwiki/remote/openmajor/di/ApiModule.kt (1 hunks)
- remote/signup/src/main/java/com/suwiki/remote/signup/api/SignUpApi.kt (1 hunks)
- remote/signup/src/main/java/com/suwiki/remote/signup/di/ApiModule.kt (2 hunks)
- remote/timetable/src/main/java/com.suwiki.remote.timetable/api/OpenLectureApi.kt (1 hunks)
- remote/timetable/src/main/java/com.suwiki.remote.timetable/di/ApiModule.kt (2 hunks)
- remote/user/src/main/java/com/suwiki/remote/user/api/UserApi.kt (1 hunks)
- remote/user/src/main/java/com/suwiki/remote/user/di/ApiModule.kt (1 hunks)
- settings.gradle.kts (2 hunks)
Files skipped from review due to trivial changes (15)
- build-logic/convention/src/main/java/RemoteConventionPlugin.kt
- remote/common/src/main/AndroidManifest.xml
- remote/common/src/main/java/com/suwiki/remote/common/di/Consts.kt
- remote/common/src/main/java/com/suwiki/remote/common/di/Qualifier.kt
- remote/common/src/main/java/com/suwiki/remote/common/di/RepositoryModule.kt
- remote/common/src/main/java/com/suwiki/remote/common/model/TokenResponse.kt
- remote/common/src/main/java/com/suwiki/remote/common/repository/AuthRepository.kt
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/ApiResult.kt
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/ApiResultCallAdapter.kt
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/Json.kt
- remote/common/src/main/java/com/suwiki/remote/common/retrofit/SuwikiErrorResponse.kt
- remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/api/ExamMyApi.kt
- remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamViewerApi.kt
- remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt
- settings.gradle.kts
Additional comments not posted (39)
remote/common/src/main/java/com/suwiki/remote/common/di/ApiModule.kt (1)
17-17
:@NoAuthRetrofit
์ ๋ ธํ ์ด์ ์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ ์ ํ์ง ํ์ธํ์ธ์.AuthApi
๋ ์ธ์ฆ์ด ํ์ํ API๋ก ๋ณด์ด๋ฏ๋ก@AuthRetrofit
๊ฐ ๋ ์ ํฉํ ์ ์์ต๋๋ค.remote/signup/src/main/java/com/suwiki/remote/signup/di/ApiModule.kt (1)
16-16
:@NoAuthRetrofit
์ ๋ ธํ ์ด์ ์ฌ์ฉ์ด ์ ์ ํฉ๋๋ค. ํ์๊ฐ์ API๋ ์ผ๋ฐ์ ์ผ๋ก ์ฌ์ ์ธ์ฆ์ด ํ์ํ์ง ์๊ธฐ ๋๋ฌธ์ ๋๋ค.remote/user/src/main/java/com/suwiki/remote/user/di/ApiModule.kt (1)
3-3
:@AuthRetrofit
์ ๋ ธํ ์ด์ ์ฌ์ฉ์ด ์ ์ ํฉ๋๋ค. ์ฌ์ฉ์ ๊ด๋ จ API๋ ์ผ๋ฐ์ ์ผ๋ก ์ธ์ฆ์ด ํ์ํ๊ธฐ ๋๋ฌธ์ ๋๋ค.remote/timetable/src/main/java/com.suwiki.remote.timetable/di/ApiModule.kt (2)
3-3
:NoAuthRetrofit
์ผ๋ก์ ๋ณ๊ฒฝ์ ์ด ๋ชจ๋์ Retrofit ์ข ์์ฑ์ ๊ฐฑ์ ํ๋ ๋ฐ ํ์ํฉ๋๋ค. ๋ณ๊ฒฝ ์ฌํญ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
16-16
:OpenLectureApi
๋ฅผ ์ ๊ณตํ๋ ํจ์์ ์๊ทธ๋์ฒ ๋ณ๊ฒฝ์ ์ ์ ํ๋ฉฐ, ์ฃผ์ ๋ณ๊ฒฝ์ด ์๋ ๊ฒ์ ํจ์์ ๋ช ํ์ฑ์ ์ ์งํ๋ ๋ฐ ๋์์ด ๋ฉ๋๋ค. ๋ณ๊ฒฝ ์ฌํญ์ ์น์ธํฉ๋๋ค.remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureReportApi.kt (1)
3-3
:ApiResult
์ ์ํฌํธ ๊ฒฝ๋ก ๋ณ๊ฒฝ์ ๋ชจ๋ ๋ฆฌํฉํ ๋ง์ ์ผํ์ผ๋ก ์ ์ ํฉ๋๋ค. ๋ฌธ์ ๊ฐ ์์ต๋๋ค.remote/login/src/main/java/com/suwiki/remote/login/di/ApiModule.kt (1)
3-3
:AuthRetrofit
์ ์ํฌํธ ๊ฒฝ๋ก ๋ณ๊ฒฝ์ ์๋ก์ด ๋ชจ๋ ๊ตฌ์กฐ์ ๋ง๊ฒ ์กฐ์ ๋์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ ์ ์ ํ๋ฉฐ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.remote/openmajor/src/main/java/com/suwiki/remote/openmajor/di/ApiModule.kt (1)
3-3
:AuthRetrofit
์ ์ํฌํธ ๊ฒฝ๋ก ๋ณ๊ฒฝ์ ์๋ก์ด ๋ชจ๋ ๊ตฌ์กฐ์ ๋ง๊ฒ ์กฐ์ ๋์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ ์ ์ ํ๋ฉฐ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.remote/timetable/src/main/java/com.suwiki.remote.timetable/api/OpenLectureApi.kt (1)
3-3
: ์์ ๋ณ๊ฒฝ ์น์ธ.remote/notice/src/main/java/com/suwiki/remote/notice/di/ApiModule.kt (1)
3-3
: ์์ ๋ฐ ํจ์ ์๋ช ๋ณ๊ฒฝ ์น์ธ.Also applies to: 18-18
Verification successful
NoAuthRetrofit์ด ํ๋ก์ ํธ ๋ด์์ ์ ๋๋ก ๊ตฌ์ฑ๋๊ณ ์ผ๊ด๋๊ฒ ์ฌ์ฉ๋๊ณ ์์ต๋๋ค. ๋ค์ ํ์ผ์์ ์ด๋ฅผ ํ์ธํ ์ ์์ต๋๋ค:
remote/common/src/main/java/com/suwiki/remote/common/di/NetworkModule.kt
remote/timetable/src/main/java/com.suwiki.remote.timetable/di/ApiModule.kt
remote/signup/src/main/java/com/suwiki/remote/signup/di/ApiModule.kt
remote/notice/src/main/java/com/suwiki/remote/notice/di/ApiModule.kt
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Ensure NoAuthRetrofit is correctly configured in the project. # Test: Search for NoAuthRetrofit configuration. rg --type kotlin $'NoAuthRetrofit'Length of output: 1266
remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamReportApi.kt (1)
3-3
: ์์ ๋ณ๊ฒฝ ์น์ธ.remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/api/LectureMyApi.kt (1)
3-3
: ์์ ๋ณ๊ฒฝ ์น์ธ.remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/di/ApiModule.kt (2)
3-3
: ์์ ๋ import ๊ฒฝ๋ก๊ฐ ์ ์ ํ๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค.AuthRetrofit
์ด๋ ธํ ์ด์ ์ ์ฌ์ฉํ๋ ๊ฒ์ด ์ ํฉํ์ง ํ์ธํด์ฃผ์ธ์.
Line range hint
10-10
:@AuthRetrofit
์ด๋ ธํ ์ด์ ์ ์ฌ์ฉํ์ฌ ์์กด์ฑ ์ฃผ์ ์ด ์ผ๊ด์ฑ ์๊ฒ ๊ด๋ฆฌ๋๊ณ ์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ฌํญ์ด ๋ค๋ฅธ ๋ชจ๋์ ์ํฅ์ ๋ฏธ์น์ง ์๋์ง ํ์ธํ๋ ๊ฒ์ด ์ข๊ฒ ์ต๋๋ค.Also applies to: 12-12
Verification successful
@AuthRetrofit
์ด๋ ธํ ์ด์ ์ด ํ๋ก์ ํธ ์ ๋ฐ์์ ์ผ๊ด๋๊ฒ ์ฌ์ฉ๋๊ณ ์์ต๋๋ค. ๋ค๋ฅธ ๋ชจ๋์์๋ ๋์ผํ๊ฒ ์ ์ฉ๋๊ณ ์์ด, ์์กด์ฑ ์ฃผ์ ์ด ์ฌ๋ฐ๋ฅด๊ฒ ๊ด๋ฆฌ๋๊ณ ์์์ ํ์ธํ์ต๋๋ค.
@AuthRetrofit
์ด๋ ธํ ์ด์ ์ด ๋ค์ ํ์ผ๋ค์์ ์ฌ์ฉ๋๊ณ ์์ต๋๋ค:
remote/common/src/main/java/com/suwiki/remote/common/di/NetworkModule.kt
remote/user/src/main/java/com/suwiki/remote/user/di/ApiModule.kt
remote/openmajor/src/main/java/com/suwiki/remote/openmajor/di/ApiModule.kt
remote/login/src/main/java/com/suwiki/remote/login/di/ApiModule.kt
remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt
remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/di/ApiModule.kt
remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/di/ApiModule.kt
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `@AuthRetrofit` annotation is consistently used across the project. # Test: Search for the usage of `@AuthRetrofit` annotation. rg --type kotlin $'@AuthRetrofit'Length of output: 2049
remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/di/ApiModule.kt (2)
3-3
: ๋์ผํAuthRetrofit
์ด๋ ธํ ์ด์ ์ด ์ฌ์ฉ๋์์ต๋๋ค. ์ด ์ด๋ ธํ ์ด์ ์ ์ผ๊ด๋ ์ฌ์ฉ์ ์ฝ๋์ ์ ์ง๋ณด์๋ฅผ ์ฉ์ดํ๊ฒ ํฉ๋๋ค.
Line range hint
10-10
: API ์์กด์ฑ ์ฃผ์ ์ด ์ผ๊ด๋๊ฒ ๊ด๋ฆฌ๋๊ณ ์์ต๋๋ค. ๋ค๋ฅธ ๋ชจ๋์์๋ ๋์ผํ ๋ฐฉ์์ผ๋ก ๊ด๋ฆฌ๋๋์ง ํ์ธํ์ธ์.Also applies to: 12-12
Verification successful
API ์์กด์ฑ ์ฃผ์ ์ด ์ผ๊ด๋๊ฒ ๊ด๋ฆฌ๋๊ณ ์์ต๋๋ค.
@AuthRetrofit
์ ๋ ธํ ์ด์ ์ด ๋ค์ํ ๋ชจ๋์์ ์ผ๊ด๋๊ฒ ์ฌ์ฉ๋๊ณ ์์์ ํ์ธํ์ต๋๋ค.
remote/user/src/main/java/com/suwiki/remote/user/di/ApiModule.kt
remote/common/src/main/java/com/suwiki/remote/common/di/NetworkModule.kt
remote/login/src/main/java/com/suwiki/remote/login/di/ApiModule.kt
remote/openmajor/src/main/java/com/suwiki/remote/openmajor/di/ApiModule.kt
remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/di/ApiModule.kt
remote/lectureevaluation/my/src/main/java/com/suwiki/remote/lectureevaluation/my/di/ApiModule.kt
remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Ensure consistent use of `@AuthRetrofit` across different modules. # Test: Search for the usage of `@AuthRetrofit` annotation. rg --type kotlin $'@AuthRetrofit'Length of output: 2049
remote/common/build.gradle.kts (2)
9-9
: ๋ค์์คํ์ด์ค๊ฐ ์ ์ ํ๊ฒ ์ค์ ๋์ด ์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ด ํ๋ก์ ํธ์ ๋ค๋ฅธ ๋ถ๋ถ์ ์ํฅ์ ์ฃผ์ง ์๋์ง ํ์ธํ์ธ์.Verification successful
๋ค์์คํ์ด์ค
com.suwiki.remote.common
์ด ๋ค๋ฅธ ๋ค์์คํ์ด์ค์ ์ถฉ๋ํ์ง ์๋ ๊ฒ์ ํ์ธํ์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ด ํ๋ก์ ํธ์ ๋ค๋ฅธ ๋ถ๋ถ์ ์ํฅ์ ์ฃผ์ง ์์ต๋๋ค.
remote/common/build.gradle.kts
:namespace = "com.suwiki.remote.common"
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the new namespace does not conflict with existing namespaces in the project. # Test: Search for namespace declarations across the project. rg --type kotlin $'namespace ='Length of output: 3184
13-13
:buildConfigField
๋ฅผ ํตํด ํ๊ฒฝ์ ๋ฐ๋ผ ๋ค๋ฅธBASE_URL
์ ์ค์ ํ์์ต๋๋ค. ์ด ์ค์ ์ด ์ ์ ํ๊ฒ ์ ์ฉ๋์๋์ง ํ ์คํธ๋ฅผ ํตํด ํ์ธํด๋ณด์ธ์.Also applies to: 17-17
Verification successful
buildConfigField
๋ฅผ ํตํด ์ค์ ๋BASE_URL
์ด ์ ์ ํ๊ฒ ์ ์ฉ๋์๋์ง ํ์ธํ์ต๋๋ค.build.gradle.kts
ํ์ผ์์ ๋ ๊ฐ์งBASE_URL
์ค์ ์ด ํ์ธ๋์์ผ๋ฉฐ,NetworkModule.kt
ํ์ผ์์BuildConfig.BASE_URL
์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ฌ์ฉ๋๊ณ ์์์ ํ์ธํ์ต๋๋ค.
remote/common/build.gradle.kts
buildConfigField("String", "BASE_URL", "String.valueOf(\"http://54.180.72.97:8080\")")
buildConfigField("String", "BASE_URL", "String.valueOf(\"https://api.suwiki.kr\")")
remote/common/src/main/java/com/suwiki/remote/common/di/NetworkModule.kt
.baseUrl(BuildConfig.BASE_URL)
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the BASE_URL is correctly applied in different build environments. # Test: Search for BASE_URL configurations in the project. rg --type kotlin $'BASE_URL'Length of output: 492
Script:
#!/bin/bash # Description: Verify the BASE_URL configurations in build.gradle.kts # Check the build.gradle.kts file for BASE_URL configurations rg 'buildConfigField\("String", "BASE_URL", "String.valueOf\("' --context 3 # Check the usage of BASE_URL in NetworkModule.kt rg 'BuildConfig.BASE_URL' --context 3Length of output: 1696
Script:
#!/bin/bash # Description: Verify the BASE_URL configurations in build.gradle.kts # Check the build.gradle.kts file for BASE_URL configurations rg 'buildConfigField\("String", "BASE_URL", "String.valueOf\("' --context 3 # Check the usage of BASE_URL in NetworkModule.kt rg 'BuildConfig.BASE_URL' --context 3Length of output: 1696
remote/common/src/main/java/com/suwiki/remote/common/interceptor/AuthenticationInterceptor.kt (2)
1-1
: ํจํค์ง์ import ๊ฒฝ๋ก๊ฐ ์ ์ ํ๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค.AuthRepository
์accessToken
์ ์ฌ์ฉํ๋ ๋ฐฉ์์ด ์ ์ ํ์ง ๊ฒํ ํด์ฃผ์ธ์.Also applies to: 3-5
19-19
:addHeader
๋ฅผ ์ฌ์ฉํ์ฌ ์ธ์ฆ ํค๋๋ฅผ ์ถ๊ฐํ์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ด ์ค์ ๋ก ์ธ์ฆ ๊ณผ์ ์ ์ํฅ์ ์ฃผ๋์ง ํ์ธํด๋ณด์ธ์.Verification successful
addHeader
๋ฉ์๋๋ฅผ ์ฌ์ฉํ์ฌ ์ธ์ฆ ํค๋๊ฐ ์ถ๊ฐ๋๋์ง ํ์ธํ ๊ฒฐ๊ณผ,AuthenticationInterceptor
๊ฐNetworkModule.kt
ํ์ผ์์OkHttpClient
์ ํตํฉ๋์ด ์ฌ์ฉ๋๊ณ ์์์ ํ์ธํ์ต๋๋ค. ์ด๋ ์ธ์ฆ ํค๋๊ฐ ์ค์ ๋ก ์ธ์ฆ ๊ณผ์ ์ ์ํฅ์ ๋ฏธ์น ๊ฐ๋ฅ์ฑ์ด ๋์์ ์๋ฏธํฉ๋๋ค.
AuthenticationInterceptor
๋NetworkModule.kt
์์OkHttpClient
์addInterceptor
๋ฉ์๋๋ฅผ ํตํด ์ถ๊ฐ๋ฉ๋๋ค.- ์ด๋ก ์ธํด
AuthenticationInterceptor
๊ฐ ์์ฒญ ์ ํค๋๋ฅผ ์ถ๊ฐํ๋ ์ญํ ์ ํ๊ฒ ๋ฉ๋๋ค.ํด๋น ๋ณ๊ฒฝ์ด ์ธ์ฆ ๊ณผ์ ์ ์ํฅ์ ๋ฏธ์น๋ ๊ฒ์ผ๋ก ๋ณด์ ๋๋ค.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the authentication header is correctly added and affects the authentication process. # Test: Search for the usage of `addHeader` method in the project. rg --type kotlin $'addHeader'Length of output: 175
Script:
#!/bin/bash # Description: Verify the integration of AuthenticationInterceptor in the codebase. # Search for the usage of AuthenticationInterceptor in the project. rg --type kotlin 'AuthenticationInterceptor'Length of output: 649
Script:
#!/bin/bash # Description: Inspect the integration of AuthenticationInterceptor in NetworkModule.kt. # Extract relevant parts of NetworkModule.kt to see how AuthenticationInterceptor is integrated. rg --type kotlin --context 10 'AuthenticationInterceptor' remote/common/src/main/java/com/suwiki/remote/common/di/NetworkModule.ktLength of output: 1553
remote/signup/src/main/java/com/suwiki/remote/signup/api/SignUpApi.kt (2)
3-3
: ๋ณ๊ฒฝ๋ ๋ชจ๋ ๊ตฌ์กฐ๋ฅผ ๋ฐ์ํ์ฌ import ๋ฌธ์ด ์ ๋ฐ์ดํธ ๋์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ PR์ ๋ชฉํ์ ์์ฝ์ ์ผ์นํฉ๋๋ค.
Line range hint
9-17
: API ๋ฉ์๋๋ค์ด ์๋ก์ด import๋ฅผ ์ฌ์ฉํ๋๋ก ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค. TODO ์ฃผ์์ ๋ฐ๋ฅด๋ฉด v2 API๋ก์ ์ ๊ทธ๋ ์ด๋๊ฐ ํ์ํฉ๋๋ค. ์ด๋ ํ์ฌ PR์ ๋ฒ์๋ฅผ ๋ฒ์ด๋ฉ๋๋ค.remote/login/src/main/java/com/suwiki/remote/login/api/LoginApi.kt (2)
3-3
: ๋ณ๊ฒฝ๋ ๋ชจ๋ ๊ตฌ์กฐ๋ฅผ ๋ฐ์ํ์ฌ import ๋ฌธ์ด ์ ๋ฐ์ดํธ ๋์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ ์ผ๊ด์ฑ์ ์ ์งํ๊ณ ์์ต๋๋ค.
Line range hint
9-21
: API ๋ฉ์๋๋ค์ด ์๋ก์ด import๋ฅผ ์ฌ์ฉํ๋๋ก ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค. TODO ์ฃผ์์ ๋ฐ๋ฅด๋ฉด v2 API๋ก์ ์ ๊ทธ๋ ์ด๋๊ฐ ํ์ํฉ๋๋ค. ์ด๋ ํ์ฌ PR์ ๋ฒ์๋ฅผ ๋ฒ์ด๋ฉ๋๋ค.remote/notice/src/main/java/com/suwiki/remote/notice/api/NoticeApi.kt (2)
3-3
: ๋ณ๊ฒฝ๋ ๋ชจ๋ ๊ตฌ์กฐ๋ฅผ ๋ฐ์ํ์ฌ import ๋ฌธ์ด ์ ๋ฐ์ดํธ ๋์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ ์ผ๊ด์ฑ์ ์ ์งํ๊ณ ์์ต๋๋ค.
Line range hint
9-25
: API ๋ฉ์๋๋ค์ด ์๋ก์ด import๋ฅผ ์ฌ์ฉํ๋๋ก ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค.remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/api/ExamEditorApi.kt (2)
3-3
: ๋ณ๊ฒฝ๋ ๋ชจ๋ ๊ตฌ์กฐ๋ฅผ ๋ฐ์ํ์ฌ import ๋ฌธ์ด ์ ๋ฐ์ดํธ ๋์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ ์ผ๊ด์ฑ์ ์ ์งํ๊ณ ์์ต๋๋ค.
Line range hint
9-23
: API ๋ฉ์๋๋ค์ด ์๋ก์ด import๋ฅผ ์ฌ์ฉํ๋๋ก ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ฐ์ดํธ๋์์ต๋๋ค. TODO ์ฃผ์์ ๋ฐ๋ฅด๋ฉด v2 API๋ก์ ์ ๊ทธ๋ ์ด๋๊ฐ ํ์ํฉ๋๋ค. ์ด๋ ํ์ฌ PR์ ๋ฒ์๋ฅผ ๋ฒ์ด๋ฉ๋๋ค.remote/lectureevaluation/editor/src/main/java/com/suwiki/remote/lectureevaluation/editor/api/LectureEditorApi.kt (1)
3-3
: APIResult์ ์ํฌํธ ๊ฒฝ๋ก๊ฐ ๋ณ๊ฒฝ๋์์ต๋๋ค. ์ ๊ฒฝ๋ก๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ๋์ง ํ์ธํ์ธ์.remote/user/src/main/java/com/suwiki/remote/user/api/UserApi.kt (1)
3-3
: APIResult์ ์ํฌํธ ๊ฒฝ๋ก๊ฐ ๋ณ๊ฒฝ๋์์ต๋๋ค. ์ ๊ฒฝ๋ก๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ๋์ง ํ์ธํ์ธ์.remote/openmajor/src/main/java/com/suwiki/remote/openmajor/api/MajorApi.kt (1)
3-3
: APIResult์ ์ํฌํธ ๊ฒฝ๋ก๊ฐ ๋ณ๊ฒฝ๋์์ต๋๋ค. ์ ๊ฒฝ๋ก๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ๋์ง ํ์ธํ์ธ์.remote/common/src/main/java/com/suwiki/remote/common/repository/AuthRepositoryImpl.kt (1)
4-7
: ์ธ์ฆ ๊ด๋ จ ๋ฆฌํฌ์งํ ๋ฆฌ์ ์ํฌํธ ๊ฒฝ๋ก๊ฐ ๋ณ๊ฒฝ๋์์ต๋๋ค. ์ ๊ฒฝ๋ก๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ๋์ง ํ์ธํ๊ณ ,onSuccess
๋ฐonFailure
๋ฉ์๋๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ฌ์ฉ๋์๋์ง ๊ฒํ ํ์ธ์.remote/common/src/main/java/com/suwiki/remote/common/retrofit/ResultCallAdapterFactory.kt (1)
Line range hint
6-34
: ์ด ํด๋์ค๋ Retrofit์ CallAdapter ํฉํ ๋ฆฌ๋ฅผ ํ์ฅํ์ฌ API ํธ์ถ์ ๋ฐํ ์ ํ์ ๋ฐ๋ผ ์ ์ ํ CallAdapter ์ธ์คํด์ค๋ฅผ ์์ฑํฉ๋๋ค. ๋ฐํ ์ ํ์ด ParameterizedType์ด ์๋ ๊ฒฝ์ฐ, ์ ์ ํ ์์ธ ๋ฉ์์ง์ ํจ๊ป IllegalArgumentException์ ๋ฐ์์ํค๋ ๊ฒ์ ์ข์ ์์ธ ์ฒ๋ฆฌ ๋ฐฉ์์ ๋๋ค.remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureViewerApi.kt (2)
3-3
: ์์ ๋ import ๋ฌธ์ ๋ฆฌํฉํ ๋ง๋ ๋ชจ๋ ๊ตฌ์กฐ๋ฅผ ๋ฐ์ํฉ๋๋ค. ์ ์ ํ ๋ณ๊ฒฝ์ผ๋ก ๋ณด์ ๋๋ค.
Line range hint
15-39
: API ๋ฉ์๋ ์ ์๊ฐ ๋ช ํํ๋ฉฐ, ๋ฐํ ์ ํ์ผ๋ก ์ ๋ฐ์ดํธ๋ApiResult
๋ฅผ ์ฌ์ฉํ์ฌ ์ผ๊ด์ฑ์ ์ ์งํฉ๋๋ค. ๊ธฐ๋ณธ ๋งค๊ฐ๋ณ์์ ๊ตฌ์กฐํ๋ ์๋ํฌ์ธํธ ๊ฒฝ๋ก๊ฐ ์ ์ ์๋์ด ์์ต๋๋ค.remote/common/src/main/java/com/suwiki/remote/common/di/NetworkModule.kt (2)
Line range hint
28-76
: OkHttpClient ์ธ์คํด์ค ์ ๊ณต ๋ฉ์๋๋ ์ ์ ํ ํ์์์๊ณผ ์ธํฐ์ ํฐ๋ฅผ ์ค์ ํฉ๋๋ค.@NoAuthOkHttpClient
๋ฐ@AuthOkHttpClient
์ฃผ์์ ์ฌ์ฉํ์ฌ ๋ค๋ฅธ ํด๋ผ์ด์ธํธ ๊ตฌ์ฑ์ ๊ตฌ๋ถํ๋ ๊ฒ์ ์ข์ ์ค์ต์ ๋๋ค.
Line range hint
75-105
: Retrofit ์ธ์คํด์ค ์ ๊ณต ๋ฐฉ๋ฒ์ ์ฌ๋ฐ๋ฅธ ๊ธฐ๋ณธ URL, ํด๋ผ์ด์ธํธ ๋ฐ ๋ณํ๊ธฐ๋ฅผ ์ฌ์ฉํ์ฌ API ํธ์ถ์ด ์ฌ๋ฐ๋ฅด๊ฒ ํ์ํ๋๊ณ ์คํ๋๋๋ก ํฉ๋๋ค.gradle/libs.versions.toml (2)
194-194
: ์๋ก์ดandroidx-junit
๋ฒ๋ค์ด ์ถ๊ฐ๋์์ต๋๋ค. ์ด ๋ณ๊ฒฝ์ด ํ๋ก์ ํธ ์ค์ ์ ์ฌ๋ฐ๋ฅด๊ฒ ํตํฉ๋์๋์ง ํ์ธํด์ฃผ์ธ์.
Line range hint
9-9
: compose-bom ๋ฒ์ ์ด ์ ๋ฐ์ดํธ๋์์ต๋๋ค. ์ ๋ฒ์ ์ด ๋ค๋ฅธ Compose ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ํธํ๋๋์ง ํ์ธํด์ฃผ์ธ์.
๐ฎ ๊ด๋ จ ์ด์
Summary by CodeRabbit
Refactor
ApiResult
๊ฐcom.suwiki.core.network.retrofit
์์com.suwiki.remote.common.retrofit
๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค.NormalRetrofit
์ดNoAuthRetrofit
์ผ๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค.AuthRetrofit
์ดcom.suwiki.core.network.di
์์com.suwiki.remote.common.di
๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค.Chores
settings.gradle.kts
์์core:network
๋ชจ๋์ด ์ ๊ฑฐ๋๊ณremote:common
๋ชจ๋์ด ์ถ๊ฐ๋์์ต๋๋ค.