File tree Expand file tree Collapse file tree 4 files changed +5
-7
lines changed
data-github/src/main/kotlin/io/github/jisungbin/gitmessengerbot/data/github/repo
presentation/src/main/kotlin/io/github/jisungbin/gitmessengerbot Expand file tree Collapse file tree 4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import retrofit2.Retrofit
3030class GithubRepoRepositoryImpl (retrofit : Retrofit ) : GithubRepoRepository {
3131 private val api = retrofit.create(GithubRepoService ::class .java)
3232 private val githubData: GithubData = Storage .read(GithubConstant .DataPath , null )?.toModel()
33- ? : /* throw DataGithubException("GithubConfig.DataPath 데이터가 null 이에요.")*/ GithubData () // TODO: null 대응 (ScopedStorage 대응 )
33+ ? : /* throw DataGithubException("GithubConfig.DataPath 데이터가 null 이에요.")*/ GithubData () // TODO: null 대응 (ScopedStorage 고려해서 )
3434
3535 override suspend fun getFileContent (
3636 repoName : String ,
Original file line number Diff line number Diff line change @@ -60,7 +60,6 @@ import io.github.jisungbin.gitmessengerbot.activity.editor.js.mvi.JsEditorMviSta
6060import io.github.jisungbin.gitmessengerbot.activity.editor.js.mvi.MviJsEditorSuccessType
6161import io.github.jisungbin.gitmessengerbot.common.constant.GithubConstant
6262import io.github.jisungbin.gitmessengerbot.common.core.Storage
63- import io.github.jisungbin.gitmessengerbot.common.exception.PresentationException
6463import io.github.jisungbin.gitmessengerbot.common.extension.runIf
6564import io.github.jisungbin.gitmessengerbot.common.extension.toBase64
6665import io.github.jisungbin.gitmessengerbot.common.extension.toModel
@@ -201,7 +200,7 @@ private fun DrawerLayout(
201200
202201 val repoName = script.name
203202 val gitUser: GithubData = Storage .read(GithubConstant .DataPath , null )?.toModel()
204- ? : throw PresentationException ( " GithubConfig.DataPath 데이터가 null 이에요. " )
203+ ? : GithubData () // TODO: null 대응 (ScopedStorage 고려해서 )
205204 val repoPath = " script.${script.lang.getScriptSuffix()} "
206205 val repoDescription = GithubConstant .DefaultRepoDescription // TODO
207206 val repoBranch = AppConfig .appValue.gitDefaultBranch // TODO
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ fun Header(searchField: MutableState<TextFieldValue>) {
115115 val app by AppConfig .app.collectAsState()
116116 val backgroundService = Intent (context, BackgroundService ::class .java)
117117 val githubJson =
118- Storage .read(GithubConstant .DataPath , null ) // TODO: null 처리 (ScopedStorage 대응해서 )
118+ Storage .read(GithubConstant .DataPath , null ) // TODO: null 처리 (ScopedStorage 고려해서 )
119119 val githubData: GithubData = githubJson?.toModel() ? : GithubData (userName = " User" )
120120 var searching by remember { mutableStateOf(false ) }
121121
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import dagger.hilt.InstallIn
1818import dagger.hilt.components.SingletonComponent
1919import io.github.jisungbin.gitmessengerbot.common.constant.GithubConstant
2020import io.github.jisungbin.gitmessengerbot.common.core.Storage
21- import io.github.jisungbin.gitmessengerbot.common.exception.PresentationException
2221import io.github.jisungbin.gitmessengerbot.common.extension.toModel
2322import io.github.jisungbin.gitmessengerbot.di.qualifier.AouthRetrofit
2423import io.github.jisungbin.gitmessengerbot.di.qualifier.SignedRetrofit
@@ -43,8 +42,8 @@ object RetrofitModule {
4342 private class AuthInterceptor : Interceptor {
4443 override fun intercept (chain : Interceptor .Chain ): Response {
4544 var builder = chain.request().newBuilder()
46- val githubData: GithubData = Storage .read( GithubConstant . DataPath , null )?.toModel()
47- ? : throw PresentationException ( " GithubConfig.DataPath 값이 null 이에요. " )
45+ val githubData: GithubData =
46+ Storage .read( GithubConstant . DataPath , null )?.toModel() ? : GithubData () // TODO: null 대응 (ScopedStorage 고려해서 )
4847 builder = builder
4948 .addHeader(" Authorization" , " token ${githubData.aouthToken} " )
5049 .addHeader(" Accept" , " application/json" )
You can’t perform that action at this time.
0 commit comments