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
4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import retrofit2.Retrofit
30
30
class GithubRepoRepositoryImpl (retrofit : Retrofit ) : GithubRepoRepository {
31
31
private val api = retrofit.create(GithubRepoService ::class .java)
32
32
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 고려해서 )
34
34
35
35
override suspend fun getFileContent (
36
36
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
60
60
import io.github.jisungbin.gitmessengerbot.activity.editor.js.mvi.MviJsEditorSuccessType
61
61
import io.github.jisungbin.gitmessengerbot.common.constant.GithubConstant
62
62
import io.github.jisungbin.gitmessengerbot.common.core.Storage
63
- import io.github.jisungbin.gitmessengerbot.common.exception.PresentationException
64
63
import io.github.jisungbin.gitmessengerbot.common.extension.runIf
65
64
import io.github.jisungbin.gitmessengerbot.common.extension.toBase64
66
65
import io.github.jisungbin.gitmessengerbot.common.extension.toModel
@@ -201,7 +200,7 @@ private fun DrawerLayout(
201
200
202
201
val repoName = script.name
203
202
val gitUser: GithubData = Storage .read(GithubConstant .DataPath , null )?.toModel()
204
- ? : throw PresentationException ( " GithubConfig.DataPath 데이터가 null 이에요. " )
203
+ ? : GithubData () // TODO: null 대응 (ScopedStorage 고려해서 )
205
204
val repoPath = " script.${script.lang.getScriptSuffix()} "
206
205
val repoDescription = GithubConstant .DefaultRepoDescription // TODO
207
206
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>) {
115
115
val app by AppConfig .app.collectAsState()
116
116
val backgroundService = Intent (context, BackgroundService ::class .java)
117
117
val githubJson =
118
- Storage .read(GithubConstant .DataPath , null ) // TODO: null 처리 (ScopedStorage 대응해서 )
118
+ Storage .read(GithubConstant .DataPath , null ) // TODO: null 처리 (ScopedStorage 고려해서 )
119
119
val githubData: GithubData = githubJson?.toModel() ? : GithubData (userName = " User" )
120
120
var searching by remember { mutableStateOf(false ) }
121
121
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import dagger.hilt.InstallIn
18
18
import dagger.hilt.components.SingletonComponent
19
19
import io.github.jisungbin.gitmessengerbot.common.constant.GithubConstant
20
20
import io.github.jisungbin.gitmessengerbot.common.core.Storage
21
- import io.github.jisungbin.gitmessengerbot.common.exception.PresentationException
22
21
import io.github.jisungbin.gitmessengerbot.common.extension.toModel
23
22
import io.github.jisungbin.gitmessengerbot.di.qualifier.AouthRetrofit
24
23
import io.github.jisungbin.gitmessengerbot.di.qualifier.SignedRetrofit
@@ -43,8 +42,8 @@ object RetrofitModule {
43
42
private class AuthInterceptor : Interceptor {
44
43
override fun intercept (chain : Interceptor .Chain ): Response {
45
44
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 고려해서 )
48
47
builder = builder
49
48
.addHeader(" Authorization" , " token ${githubData.aouthToken} " )
50
49
.addHeader(" Accept" , " application/json" )
You can’t perform that action at this time.
0 commit comments