-
Notifications
You must be signed in to change notification settings - Fork 0
[feat/#36] logout, 회원탈퇴, CICD Error #37
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
3 commits
Select commit
Hold shift + click to select a range
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 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
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/hsLink/hslink/data/dto/request/auth/LogoutRequestDto.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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // data/dto/request/auth/LogoutRequestDto.kt | ||
| package com.hsLink.hslink.data.dto.request.auth | ||
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class LogoutRequestDto( | ||
| val refreshToken: String | ||
| ) |
9 changes: 9 additions & 0 deletions
9
app/src/main/java/com/hsLink/hslink/data/dto/request/auth/WithdrawRequestDto.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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| // data/dto/request/auth/WithdrawRequestDto.kt | ||
| package com.hsLink.hslink.data.dto.request.auth | ||
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class WithdrawRequestDto( | ||
| val refreshToken: String | ||
| ) |
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/hsLink/hslink/data/dto/response/auth/WithdrawResponseDto.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 |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| // data/dto/response/auth/WithdrawResponseDto.kt | ||
| package com.hsLink.hslink.data.dto.response.auth | ||
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class WithdrawResponseDto( | ||
| val userId: Long, | ||
| val deletedAt: String | ||
| ) |
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
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/hsLink/hslink/data/service/login/AuthService.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,12 +1,23 @@ | ||
| package com.hsLink.hslink.data.service.login | ||
|
|
||
| import com.hsLink.hslink.core.network.BaseResponse | ||
| import com.hsLink.hslink.data.dto.request.auth.LogoutRequestDto | ||
| import com.hsLink.hslink.data.dto.request.auth.SocialLoginRequestDto | ||
| import com.hsLink.hslink.data.dto.request.auth.WithdrawRequestDto | ||
| import com.hsLink.hslink.data.dto.response.auth.SocialLoginResponseDto | ||
| import com.hsLink.hslink.data.dto.response.auth.WithdrawResponseDto | ||
| import retrofit2.Response | ||
| import retrofit2.http.Body | ||
| import retrofit2.http.DELETE | ||
| import retrofit2.http.POST | ||
|
|
||
| interface AuthService { | ||
| @POST("auth/login") | ||
| suspend fun socialLogin(@Body request: SocialLoginRequestDto): Response<SocialLoginResponseDto> | ||
|
|
||
| @POST("auth/logout") | ||
| suspend fun logout(@Body request: LogoutRequestDto): Response<Unit> | ||
|
|
||
| @DELETE("auth/withdraw") | ||
| suspend fun withdraw(@Body request: WithdrawRequestDto): Response<BaseResponse<WithdrawResponseDto>> | ||
| } |
4 changes: 4 additions & 0 deletions
4
app/src/main/java/com/hsLink/hslink/domain/repository/AuthRepository.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,10 +1,14 @@ | ||
| package com.hsLink.hslink.domain.repository | ||
|
|
||
| import com.hsLink.hslink.data.dto.response.auth.SocialLoginResponseDto | ||
| import com.hsLink.hslink.data.dto.response.auth.WithdrawResponseDto | ||
|
|
||
| interface AuthRepository { | ||
| suspend fun loginWithSocialToken( | ||
| provider: String, | ||
| accessToken: String | ||
| ): Result<SocialLoginResponseDto> | ||
|
|
||
| suspend fun logout(): Result<Unit> | ||
| suspend fun withdraw(): Result<WithdrawResponseDto> | ||
| } |
106 changes: 106 additions & 0 deletions
106
app/src/main/java/com/hsLink/hslink/presentation/mypage/component/career/ConfirmDialog.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 |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| // presentation/mypage/component/common/ConfirmDialog.kt (이름 변경) | ||
| package com.hsLink.hslink.presentation.mypage.component.career | ||
|
|
||
| import androidx.compose.foundation.layout.Arrangement | ||
| import androidx.compose.foundation.layout.Column | ||
| import androidx.compose.foundation.layout.Row | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.material3.AlertDialog | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.graphics.Color | ||
| import androidx.compose.ui.text.style.TextAlign | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import androidx.compose.ui.unit.sp | ||
| import com.hsLink.hslink.core.designsystem.component.HsLinkActionButton | ||
| import com.hsLink.hslink.core.designsystem.component.HsLinkActionButtonSize | ||
| import com.hsLink.hslink.core.designsystem.component.HsLinkButtonSize | ||
| import com.hsLink.hslink.core.designsystem.component.HsLinkSelectButton | ||
| import com.hsLink.hslink.core.designsystem.theme.HsLinkTheme | ||
|
|
||
|
|
||
| @Preview(showBackground = true) | ||
| @Composable | ||
| private fun ConfirmDialogLogoutPreview() { | ||
| HsLinkTheme { | ||
| ConfirmDialog( | ||
| title = "로그아웃을\n하시겠습니까?", | ||
| message = null, | ||
| cancelText = "취소", | ||
| confirmText = "확인", | ||
| onDismiss = {}, | ||
| onConfirm = {} | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Composable | ||
| fun ConfirmDialog( | ||
| modifier: Modifier = Modifier, | ||
| title: String, | ||
| message: String? = null, | ||
| cancelText: String = "취소", | ||
| confirmText: String = "확인", | ||
| onDismiss: () -> Unit, | ||
| onConfirm: () -> Unit, | ||
| ) { | ||
| AlertDialog( | ||
| onDismissRequest = onDismiss, | ||
| containerColor = Color.White, // ← 완전 하얀색 배경 | ||
| title = { | ||
| Text( | ||
| text = title, | ||
| style = HsLinkTheme.typography.title_20Strong, | ||
| textAlign = TextAlign.Center, | ||
| modifier = Modifier.fillMaxWidth() | ||
| ) | ||
| }, | ||
| text = message?.let { | ||
| { | ||
| Column( | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
| .padding(vertical = 12.dp), // ← 전체 여백 | ||
| horizontalAlignment = Alignment.CenterHorizontally | ||
| ) { | ||
| Text( | ||
| text = it, | ||
| style = HsLinkTheme.typography.body_14Normal, | ||
| color = HsLinkTheme.colors.Grey600, | ||
| textAlign = TextAlign.Center, | ||
| lineHeight = 20.sp, // ← 줄 간격 고정값 | ||
| modifier = Modifier.fillMaxWidth() | ||
| ) | ||
| } | ||
| } | ||
| }, | ||
| confirmButton = { | ||
| Row( | ||
| modifier = Modifier.fillMaxWidth(), | ||
| horizontalArrangement = Arrangement.spacedBy(8.dp) | ||
| ) { | ||
| // ← 취소하기 (회색 배경) | ||
| HsLinkActionButton( | ||
| label = cancelText, // "취소하기" | ||
| onClick = onDismiss, | ||
| size = HsLinkActionButtonSize.Small, // ← 회색 배경 | ||
| modifier = Modifier.weight(1f) | ||
| ) | ||
|
|
||
| // ← 확인 버튼 (파란색 배경) | ||
| HsLinkActionButton( | ||
| label = confirmText, // "로그아웃" 또는 "삭제하기" | ||
| onClick = onConfirm, | ||
| size = HsLinkActionButtonSize.Large, // ← 파란색 배경 | ||
| modifier = Modifier.weight(1f) | ||
| ) | ||
| } | ||
| }, | ||
| dismissButton = null, | ||
| modifier = modifier | ||
| ) | ||
| } |
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.
Potential NPE risk with !! operator.
Line 74 uses the
!!operator onresponse.body(), which could throw aNullPointerExceptioneven after checkingisSuccessfulandisSuccess. Although unlikely, HTTP responses can have null bodies in edge cases.Apply this diff to handle the null case safely:
🤖 Prompt for AI Agents