Skip to content

Commit

Permalink
설정화면 Navigation + 탈퇴 API
Browse files Browse the repository at this point in the history
  • Loading branch information
l2hyunwoo committed Jul 7, 2023
1 parent 66e0b9b commit deb5d1d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ interface AuthService {
): AuthResponse

@PUT("api/v1/auth")
suspend fun withdraw()
suspend fun withdraw(
@Header("Authorization") authorization: String,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DefaultAuthRepository @Inject constructor(
}

override suspend fun withdraw() {
service.withdraw()
service.withdraw("Bearer ${dataStore.accessToken}")
dataStore.clear()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.teampophory.pophory.feature.home.mypage

import android.content.Intent
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
Expand All @@ -19,6 +20,7 @@ import com.teampophory.pophory.feature.home.mypage.adapter.MyPageAdapter.Compani
import com.teampophory.pophory.feature.home.mypage.adapter.MyPageAdapter.Companion.VIEW_TYPE_PHOTO
import com.teampophory.pophory.feature.home.mypage.adapter.MyPageAdapter.Companion.VIEW_TYPE_PROFILE
import com.teampophory.pophory.feature.home.mypage.util.GridSpacingCustomDecoration
import com.teampophory.pophory.feature.setting.SettingActivity
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
Expand Down Expand Up @@ -64,7 +66,8 @@ class MyPageFragment : Fragment() {
val isEmpty = photoItems.isEmpty()

val myPageInfoData = if (isEmpty) {
myPageInfoState.data.toMutableList().also { it.add(MyPageDisplayItem.Empty) }
myPageInfoState.data.toMutableList()
.also { it.add(MyPageDisplayItem.Empty) }
} else {
myPageInfoState.data
}
Expand Down Expand Up @@ -116,7 +119,7 @@ class MyPageFragment : Fragment() {

private fun setOnClickListener() {
binding.ivToolbarSetting.setOnClickListener {
//TODO intent to setting
startActivity(Intent(requireContext(), SettingActivity::class.java))
}
}
}

0 comments on commit deb5d1d

Please sign in to comment.