auth to server-V31
This commit is contained in:
parent
225556ab96
commit
fe6a81df32
4 changed files with 13 additions and 13 deletions
|
|
@ -21,7 +21,7 @@ interface TecnologiaApi {
|
|||
suspend fun login(@Body body: LoginRequest): Response<LoginResponse>
|
||||
|
||||
// 取得個人資料:通常需要 Token
|
||||
@GET("me")
|
||||
@GET("api/me")
|
||||
suspend fun getUserProfile(): Response<UserProfile>
|
||||
|
||||
// 發送好友請求
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ import com.squareup.moshi.JsonClass
|
|||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class UserProfile(
|
||||
val user_id: String,
|
||||
val username: String,
|
||||
val display_name: String,
|
||||
val email: String,
|
||||
val user_id: String?,
|
||||
val username: String?,
|
||||
val display_name: String?,
|
||||
val email: String?,
|
||||
val avatar_url: String?,
|
||||
val banner_url: String?,
|
||||
val bio: String?,
|
||||
val status: String,
|
||||
val is_active: Boolean,
|
||||
val is_verified: Boolean,
|
||||
val last_login: String,
|
||||
val created_at: String
|
||||
val status: String?,
|
||||
val is_active: Boolean?,
|
||||
val is_verified: Boolean?,
|
||||
val last_login: String?,
|
||||
val created_at: String?
|
||||
)
|
||||
|
|
@ -38,8 +38,8 @@ import androidx.lifecycle.viewmodel.compose.viewModel
|
|||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import com.example.login_v3.home.setting.setting_detail_page.detail_UI.Setting_profile_page
|
||||
import com.example.login_v3.home.setting.setting_detail_page.detail_UI.setting_devices_page
|
||||
import com.example.login_v3.home.setting.setting_detail_page.detail_UI.setting_profile_page
|
||||
import com.example.login_v3.home.setting.setting_detail_page.detail_UI.setting_subscription_page
|
||||
import com.example.login_v3.home.setting.setting_detail_page.detail_UI.setting_theme_page
|
||||
import com.example.login_v3.home.setting.setting_detail_page.viewmodel.Theme_ViewModel
|
||||
|
|
@ -123,7 +123,7 @@ fun SharedTransitionScope.setting_detail_Screen(
|
|||
startDestination = startRoute
|
||||
) {
|
||||
|
||||
composable("setting_Profile") { setting_profile_page() }
|
||||
composable("setting_Profile") { Setting_profile_page() }
|
||||
composable("setting_Theme") {
|
||||
val activity = LocalActivity.current as ComponentActivity
|
||||
val vm: Theme_ViewModel = hiltViewModel(viewModelStoreOwner = activity)
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import com.example.login_v3.home.setting.setting_detail_page.viewmodel.ProfileUi
|
|||
|
||||
|
||||
@Composable
|
||||
fun setting_profile_page(
|
||||
fun Setting_profile_page(
|
||||
viewModel: PersonalProfileViewModel = hiltViewModel()
|
||||
) {
|
||||
val uiState by viewModel.uiState.collectAsState()
|
||||
|
|
|
|||
Loading…
Reference in a new issue