-
Notifications
You must be signed in to change notification settings - Fork 2
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
[UI/#28] 유형검사 결과 페이지 #34
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
687db95
[MOD/#27] toolbar, img, title 작성
chattymin d0ac581
[MOD/#27] icon추가
chattymin 33e5ac2
[CHORE/#27] Button color 변경
chattymin 75a8b40
[CHORE/#27] shape 기초 셋팅
chattymin 3b94a5a
Merge branch 'develop' into ui/#28-tendency-test-result
chattymin ca15137
[UI/#27] 러프한 UI 완성
chattymin a863a82
[UI/#27] 여행유형 box 기본적인 디자인 구현
chattymin 4b4f3c6
[UI/#27] btn 연결
chattymin 25fd34e
[CHORE/#27] 함수화
chattymin b4289e9
[CHORE/#28] 목데이터 구조화
chattymin 3e8c331
[CHORE/#28] corner 테스트
chattymin 0a7a14c
[FEAT/#28] login 기능 구현
chattymin 13725b4
[FEAT/#28] box 내부 간격 조정
chattymin bcb8264
[UI/#28] UI 변경사항 적용
chattymin 79e4ad7
[UI/#28] UI blur 추가
chattymin bff3764
[UI/#28] 버튼 그림자 제거
chattymin b0d4c89
[UI/#28] 점선 추가
chattymin 33dcd2e
[CHORE/#28] export false 처리
chattymin 530bf68
Merge branch 'develop' into ui/#28-tendency-test-result
chattymin 1a9e46b
[CHORE/#28] BaseResponse 구현 및 적용
chattymin 7822806
[CHORE/#28] log 삭제
chattymin c7e3916
[CHORE/#28] scope 함수 적용
chattymin 7805104
[CHORE/#28] 변수명 수정
chattymin 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
This file contains 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 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 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 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
12 changes: 12 additions & 0 deletions
12
data/src/main/java/com/going/data/datasource/LoginDataSource.kt
This file contains 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,12 @@ | ||
package com.going.data.datasource | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.request.RequestLoginDto | ||
import com.going.data.dto.response.LoginResponseDto | ||
|
||
interface LoginDataSource { | ||
suspend fun postLogin( | ||
Authorization: String, | ||
platform: RequestLoginDto, | ||
): BaseResponse<LoginResponseDto> | ||
} |
18 changes: 18 additions & 0 deletions
18
data/src/main/java/com/going/data/datasourceImpl/LoginDataSourceImpl.kt
This file contains 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,18 @@ | ||
package com.going.data.datasourceImpl | ||
|
||
import com.going.data.datasource.LoginDataSource | ||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.request.RequestLoginDto | ||
import com.going.data.dto.response.LoginResponseDto | ||
import com.going.data.service.LoginService | ||
import javax.inject.Inject | ||
|
||
class LoginDataSourceImpl @Inject constructor( | ||
private val loginService: LoginService, | ||
) : LoginDataSource { | ||
override suspend fun postLogin( | ||
Authorization: String, | ||
platform: RequestLoginDto, | ||
): BaseResponse<LoginResponseDto> = | ||
loginService.postSignin(Authorization, platform) | ||
} |
This file contains 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 @@ | ||
package com.going.data.dto | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class BaseResponse<T>( | ||
@SerialName("status") | ||
val status: Int, | ||
@SerialName("message") | ||
val message: String, | ||
@SerialName("data") | ||
val data: T, | ||
) |
10 changes: 10 additions & 0 deletions
10
data/src/main/java/com/going/data/dto/request/RequestLoginDto.kt
This file contains 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,10 @@ | ||
package com.going.data.dto.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class RequestLoginDto( | ||
@SerialName("platform") | ||
val platform: String | ||
) |
37 changes: 37 additions & 0 deletions
37
data/src/main/java/com/going/data/dto/response/LoginResponseDto.kt
This file contains 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,37 @@ | ||
package com.going.data.dto.response | ||
|
||
import com.going.domain.entity.response.AuthTokenModel | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class LoginResponseDto( | ||
@SerialName("accessToken") | ||
val accessToken: String, | ||
@SerialName("refreshToken") | ||
val refreshToken: String, | ||
) { | ||
fun toAuthTokenModel() = | ||
AuthTokenModel(accessToken = accessToken, refreshToken = refreshToken) | ||
} | ||
|
||
// @Serializable | ||
// data class LoginResponseDto( | ||
// @SerialName("status") | ||
// val status: Int, | ||
// @SerialName("message") | ||
// val message: String, | ||
// @SerialName("data") | ||
// val data: Data, | ||
// ) { | ||
// @Serializable | ||
// data class Data( | ||
// @SerialName("accessToken") | ||
// val accessToken: String, | ||
// @SerialName("refreshToken") | ||
// val refreshToken: String, | ||
// ) | ||
// | ||
// fun toAuthTokenModel() = | ||
// AuthTokenModel(accessToken = data.accessToken, refreshToken = data.refreshToken) | ||
// } |
22 changes: 22 additions & 0 deletions
22
data/src/main/java/com/going/data/repositoryImpl/LoginRepositoryImpl.kt
This file contains 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,22 @@ | ||
package com.going.data.repositoryImpl | ||
|
||
import com.going.data.datasource.LoginDataSource | ||
import com.going.data.dto.request.RequestLoginDto | ||
import com.going.domain.entity.response.AuthTokenModel | ||
import com.going.domain.repository.LoginRepository | ||
import javax.inject.Inject | ||
|
||
class LoginRepositoryImpl @Inject constructor( | ||
private val loginDataSource: LoginDataSource, | ||
) : LoginRepository { | ||
override suspend fun postSignin( | ||
Authorization: String, | ||
platform: String, | ||
): Result<AuthTokenModel> = | ||
runCatching { | ||
loginDataSource.postLogin( | ||
Authorization, | ||
RequestLoginDto(platform), | ||
).data.toAuthTokenModel() | ||
} | ||
} |
This file contains 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,16 @@ | ||
package com.going.data.service | ||
|
||
import com.going.data.dto.BaseResponse | ||
import com.going.data.dto.request.RequestLoginDto | ||
import com.going.data.dto.response.LoginResponseDto | ||
import retrofit2.http.Body | ||
import retrofit2.http.Header | ||
import retrofit2.http.POST | ||
|
||
interface LoginService { | ||
@POST("api/users/signin") | ||
suspend fun postSignin( | ||
@Header("Authorization") Authorization: String, | ||
@Body body: RequestLoginDto, | ||
): BaseResponse<LoginResponseDto> | ||
} |
15 changes: 15 additions & 0 deletions
15
domain/src/main/kotlin/com/going/domain/entity/TendencyResultMock.kt
This file contains 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,15 @@ | ||
package com.going.domain.entity | ||
|
||
data class TendencyResultMock( | ||
val tendencyTitle: String, | ||
val tendencySubTitle: String, | ||
val tags: List<String>, | ||
val tendencyBoxInfo: List<BoxInfo>, | ||
) { | ||
data class BoxInfo( | ||
val title: String, | ||
val first: String, | ||
val second: String, | ||
val third: String, | ||
) | ||
} |
1 change: 0 additions & 1 deletion
1
domain/src/main/kotlin/com/going/domain/entity/response/AuthTokenModel.kt
This file contains 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,7 +1,6 @@ | ||
package com.going.domain.entity.response | ||
|
||
data class AuthTokenModel( | ||
val isResigned: Boolean, | ||
val accessToken: String, | ||
val refreshToken: String, | ||
) |
10 changes: 10 additions & 0 deletions
10
domain/src/main/kotlin/com/going/domain/repository/LoginRepository.kt
This file contains 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,10 @@ | ||
package com.going.domain.repository | ||
|
||
import com.going.domain.entity.response.AuthTokenModel | ||
|
||
interface LoginRepository { | ||
suspend fun postSignin( | ||
Authorization: String, | ||
platform: String, | ||
): Result<AuthTokenModel> | ||
} |
This file contains 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 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
Oops, something went wrong.
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.
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.
코틀린스러운 코드네요 ~~ LGTM