Skip to content

Commit

Permalink
chore: detekt 수정사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
yangsooplus committed Jan 3, 2024
1 parent d0c87bb commit 25ef406
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ dependencies {

@Suppress
fun getApiKey(propertyKey: String): String {
return gradleLocalProperties(rootDir).getProperty(propertyKey)
return gradleLocalProperties(rootDir).getProperty(propertyKey) ?: "default"
}
4 changes: 2 additions & 2 deletions data/src/main/java/com/susu/data/di/ServiceModule.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.susu.data.di

import com.susu.data.network.service.UserService
import com.susu.data.network.service.TokenService
import com.susu.data.network.service.SignUpService
import com.susu.data.network.service.TokenService
import com.susu.data.network.service.UserService
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.susu.data.network.service

import com.susu.data.model.response.TokenResponse
import com.susu.data.model.request.UserRequest
import com.susu.data.model.response.TokenResponse
import com.susu.data.model.response.ValidRegisterResponse
import retrofit2.http.Body
import retrofit2.http.GET
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.susu.data.network.service

import com.susu.data.model.response.TokenResponse
import com.susu.data.model.request.RefreshTokenRequest
import com.susu.data.model.response.TokenResponse
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.POST
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.susu.data.network.service

import com.susu.data.model.response.TokenResponse
import com.susu.data.model.request.AccessTokenRequest
import com.susu.data.model.response.TokenResponse
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.POST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import com.susu.domain.repository.SignUpRepository
import javax.inject.Inject

class CheckCanRegisterUseCase @Inject constructor(
private val signUpRepository: SignUpRepository
private val signUpRepository: SignUpRepository,
) {
suspend operator fun invoke(oauthAccessToken: String) = runCatchingIgnoreCancelled {
signUpRepository.canRegister(oauthAccessToken = oauthAccessToken)
Expand Down
4 changes: 2 additions & 2 deletions domain/src/main/java/com/susu/domain/usecase/SignUpUseCase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ class SignUpUseCase @Inject constructor(
) {
suspend operator fun invoke(
oauthAccessToken: String,
user: User
user: User,
) = runCatchingIgnoreCancelled {
tokenRepository.saveTokens(
token = signUpRepository.signUp(oauthAccessToken = oauthAccessToken, user = user)
token = signUpRepository.signUp(oauthAccessToken = oauthAccessToken, user = user),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.compose.runtime.Composable

@Composable
fun VoteScreen(
navigateToLogin: () -> Unit
navigateToLogin: () -> Unit,
) {
Button(onClick = navigateToLogin) {
Text("대충 회원가입 투표")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package com.susu.feature.mypage

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
Expand All @@ -24,7 +22,7 @@ fun MyPageScreen(
when (sideEffect) {
MyPageContract.MyPageEffect.NavigateToLogin -> navigateToLogin()
is MyPageContract.MyPageEffect.ShowToast -> {
//TODO: UI 작업 시 에러 메세지 표시
// TODO: UI 작업 시 에러 메세지 표시
navigateToLogin()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fun NavController.navigateMyPage(navOptions: NavOptions) {

fun NavGraphBuilder.myPageNavGraph(
padding: PaddingValues,
navigateToLogin: () -> Unit
navigateToLogin: () -> Unit,
) {
composable(route = MyPageRoute.route) {
MyPageScreen(padding, navigateToLogin = navigateToLogin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ sealed interface MainContract {
object MainEffect : SideEffect
data class MainState(
val isLoading: Boolean = true,
val initialRoute: InitialRoute = InitialRoute.NONE
val initialRoute: InitialRoute = InitialRoute.NONE,
) : UiState
}

0 comments on commit 25ef406

Please sign in to comment.