Skip to content
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

FEAT #6

Open
wants to merge 3 commits into
base: develop-xml
Choose a base branch
from
Open

FEAT #6

wants to merge 3 commits into from

Conversation

twogarlic
Copy link
Collaborator

@twogarlic twogarlic commented May 3, 2024

시연 영상

xml.mp4

viewmodel 적용되어있습니다

Copy link

@0se0 0se0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~

Comment on lines +37 to +39
viewBinding{
enabled = true
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildFeatures 내에서 viewBinding 활성화 시켜주셔서 삭제해도 될 거 같아요!

Comment on lines +17 to +20
@POST("member/login")
fun login(
@Body request: RequestLoginDto
): Call<ResponseLoginDto>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

중간 중간 줄 띄워주심 더 좋을 거 같습니당

Comment on lines +20 to +38
binding.btnSignup.setOnClickListener {
val intent = Intent(this, SignupActivity::class.java)
startActivity(intent)
}
binding.btnLogin.setOnClickListener {
val id = binding.etId.text.toString()
val password = binding.etPassword.text.toString()
val requestLoginDto = RequestLoginDto(
authenticationId = id,
password = password
)
authService.login(requestLoginDto).enqueue(object : Callback<ResponseLoginDto> {
override fun onResponse(
call: Call<ResponseLoginDto>,
response: Response<ResponseLoginDto>,
) {
if (response.isSuccessful) {
val loginResponse = response.body()
if (loginResponse?.code == 200) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

각 기능별로 함수화 시켜보면 코드 읽기 더 좋을 거 같아요!

Comment on lines +73 to +81
if (!isPassword(password)) {
Toast.makeText(this@SignupActivity, "비밀번호는 8자 이상이어야 하며, 숫자, 문자, 특수문자를 포함해야 합니다.", Toast.LENGTH_SHORT).show()
return null
}

if (!isPhone(phoneNumber)) {
Toast.makeText(this@SignupActivity, "전화번호 형식이 올바르지 않습니다. (예: 010-0000-0000)", Toast.LENGTH_SHORT).show()
return null
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에서 "회원가입 실패 $errorC , $errorM", 이렇게 에러메세지를 출력해주고 있어서 이 부분은 지워주셔도 될 거 같아요!

@t1nm1ksun
Copy link

고생하셨습니다!

import kotlinx.serialization.Serializable

@Serializable
data class ResponseChangePasswordDto(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

다른분들 코드보고 저도 제 코드 고쳤는데 똑같은 구조를 가진 Response dat class들은 하나로 통일시켜서 사용해도 될 것 같아요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants