auth to server-V39

This commit is contained in:
Eric85710 2026-05-03 13:50:48 +08:00
parent 13dbab79a3
commit 716fd5c528
2 changed files with 21 additions and 1 deletions

View file

@ -1,5 +1,6 @@
package com.example.login_v3.data.api.api_class
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
@JsonClass(generateAdapter = true)
@ -26,3 +27,19 @@ data class UserProfileUpdateRequest(
val display_name: String? = null,
val status: String? = null
)
@JsonClass(generateAdapter = true)
data class UserProfileResponse(
@field:Json(name = "user_id") val userId: String,
val username: String,
val email: String,
@field:Json(name = "display_name") val displayName: String,
@field:Json(name = "avatar_url") val avatarUrl: String?,
@field:Json(name = "banner_url") val bannerUrl: String?,
val bio: String?,
val status: String?,
@field:Json(name = "is_active") val isActive: Boolean,
@field:Json(name = "is_verified") val isVerified: Boolean,
@field:Json(name = "created_at") val createdAt: String,
@field:Json(name = "last_login") val lastLogin: String?
)

View file

@ -280,7 +280,10 @@ fun Loaded_setting_profile_page(
text = {
TextField(
value = tempBio,
onValueChange = { tempBio = it },
onValueChange = {
tempBio = it
Log.d("BioDebug", "目前打字內容: $it")
},
placeholder = { Text("Enter your bio") }
)
},