-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 나만아니면돼 게임 추가 및 Health Check 타입 오류 수정 #479
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2848c83
fix: Health Check 관련 BaseResponse 타입 오류 수정
PeraSite 0b7d0fb
feat: 나만아니면돼 게임 추가
PeraSite 04235ce
fix: 자동으로 바텀 네비게이션 요소가 4개 이상이면 자동으로 활성화된 요소만 보여주던 문제 수정
PeraSite 2295858
fix: 나만아니면돼 뒤로가기 아이콘 x 적용
PeraSite afa073c
fix: 웹뷰 뒤로가기 아이콘 intent 기반 적용
PeraSite 23112d5
refactor: WebView intent key 상수화
PeraSite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 14 additions & 2 deletions
16
app/src/main/java/com/eatssu/android/data/remote/repository/HealthCheckRepositoryImpl.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,26 @@ | ||
| package com.eatssu.android.data.remote.repository | ||
|
|
||
| import com.eatssu.android.data.model.isSuccess | ||
| import com.eatssu.android.data.remote.service.HealthCheckService | ||
| import com.eatssu.android.domain.repository.HealthCheckRepository | ||
| import com.eatssu.android.presentation.base.NetworkErrorEventBus | ||
| import timber.log.Timber | ||
| import java.io.IOException | ||
| import javax.inject.Inject | ||
|
|
||
| class HealthCheckRepositoryImpl @Inject constructor( | ||
| private val healthCheckService: HealthCheckService | ||
| ) : HealthCheckRepository { | ||
| override suspend fun checkHealth(): Boolean { | ||
| return healthCheckService.checkHealth().isSuccess() | ||
| return try { | ||
| val response = healthCheckService.checkHealth() | ||
| return response.isSuccessful | ||
| } catch (e: IOException) { | ||
| NetworkErrorEventBus.notifyNetworkError() | ||
| Timber.e(e, "Health check network error") | ||
| false | ||
| } catch (e: Exception) { | ||
| Timber.e(e, "Health check failed") | ||
| false | ||
| } | ||
| } | ||
| } | ||
5 changes: 2 additions & 3 deletions
5
app/src/main/java/com/eatssu/android/data/remote/service/HealthCheckService.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,13 @@ | ||
| package com.eatssu.android.data.remote.service | ||
|
|
||
| import com.eatssu.android.data.model.ApiResult | ||
| import retrofit2.Response | ||
| import retrofit2.http.GET | ||
|
|
||
| interface HealthCheckService { | ||
| /** | ||
| * 서버와 정상적으로 통신할 수 있는지 확인합니다. | ||
| * 실제 서버의 상태(healthy)를 체크하는 목적이 아니라, 네트워크 연결이 가능한지 확인하는 용도입니다. | ||
| * 반환 타입이 Unit인 이유는 응답 본문의 내용이 중요하지 않고, 통신 성공 여부만 판단하기 때문입니다. | ||
| */ | ||
| @GET("actuator/health") | ||
| suspend fun checkHealth(): ApiResult<Unit> | ||
| suspend fun checkHealth(): Response<Unit> | ||
PeraSite marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="24dp" | ||
| android:height="24dp" | ||
| android:viewportWidth="24" | ||
| android:viewportHeight="24"> | ||
| <path | ||
| android:fillColor="@color/gray300" | ||
| android:fillType="evenOdd" | ||
| android:pathData="M6.16,23.3837C7.1215,23.4534 8.304,23.4999 9.75,23.4999C11.196,23.4999 12.3785,23.4534 13.34,23.3837C15.7005,23.2128 17.36,21.623 17.829,19.456H18.566C20.4685,19.456 22.314,18.1154 22.457,15.9569C22.5139,15.0891 22.5139,14.2184 22.457,13.3506C22.314,11.1921 20.4685,9.8516 18.566,9.8516H17.747C17.5545,8.9771 16.8775,8.3048 15.9585,8.1673C14.896,8.008 12.985,7.8296 9.75,7.8296C6.515,7.8296 4.604,8.008 3.5415,8.1673C2.53,8.3189 1.8115,9.1176 1.7095,10.1215C1.609,11.1092 1.5,12.832 1.5,15.6648C1.5,16.7217 1.515,17.6175 1.5395,18.3737C1.626,21.0776 3.4215,23.186 6.1595,23.3842L6.16,23.3837ZM17.94,12.379C17.976,13.2571 18,14.3393 18,15.6648C18,16.1143 17.9973,16.5356 17.992,16.9285H18.566C19.396,16.9285 19.923,16.3866 19.9625,15.7881C20.0119,15.0327 20.0119,14.2748 19.9625,13.5194C19.923,12.9214 19.3965,12.379 18.566,12.379H17.94Z" /> | ||
| <path | ||
| android:fillColor="@color/gray300" | ||
| android:fillType="evenOdd" | ||
| android:pathData="M12.25,0.5C11.9848,0.5 11.7304,0.6065 11.5429,0.7961C11.3554,0.9857 11.25,1.2429 11.25,1.511V5.0494C11.25,5.3176 11.3554,5.5747 11.5429,5.7643C11.7304,5.9539 11.9848,6.0604 12.25,6.0604C12.5152,6.0604 12.7696,5.9539 12.9571,5.7643C13.1446,5.5747 13.25,5.3176 13.25,5.0494V1.511C13.25,1.2429 13.1446,0.9857 12.9571,0.7961C12.7696,0.6065 12.5152,0.5 12.25,0.5ZM8.25,1.511C7.9848,1.511 7.7304,1.6175 7.5429,1.8071C7.3554,1.9967 7.25,2.2539 7.25,2.522V6.0604C7.25,6.3286 7.3554,6.5857 7.5429,6.7753C7.7304,6.9649 7.9848,7.0714 8.25,7.0714C8.5152,7.0714 8.7696,6.9649 8.9571,6.7753C9.1446,6.5857 9.25,6.3286 9.25,6.0604V2.522C9.25,2.2539 9.1446,1.9967 8.9571,1.8071C8.7696,1.6175 8.5152,1.511 8.25,1.511Z" /> | ||
| </vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.