Профиль, редактирование без аватара

This commit is contained in:
Халимов Рустам
2026-04-16 15:41:22 +03:00
parent 8409c51842
commit cea3f4d669
45 changed files with 1063 additions and 178 deletions

View File

@@ -9,7 +9,7 @@ interface ProfileApi {
@GET("profiles/{id}")
suspend fun getProfile(@Path("id") id: String): ProfileDto
@GET("profiles/me")
@GET("auth/me")
suspend fun getMyProfile(): ProfileDto
@PUT("profiles/profile")

View File

@@ -1,16 +1,29 @@
package profiles.data.remote.dto
data class ProfileDto(
@com.google.gson.annotations.SerializedName("id", alternate = ["userId"])
val id: String,
@com.google.gson.annotations.SerializedName("username", alternate = ["userName"])
val username: String,
@com.google.gson.annotations.SerializedName("displayName")
val displayName: String?,
@com.google.gson.annotations.SerializedName("avatarUrl", alternate = ["avatar"])
val avatarUrl: String?,
@com.google.gson.annotations.SerializedName("bio", alternate = ["about"])
val bio: String?,
@com.google.gson.annotations.SerializedName("isOnline")
val isOnline: Boolean = false,
val lastSeen: String? = null
@com.google.gson.annotations.SerializedName("lastSeen")
val lastSeen: String? = null,
@com.google.gson.annotations.SerializedName("birthday")
val birthday: String? = null
)
data class UpdateProfileRequest(
@com.google.gson.annotations.SerializedName("displayName")
val displayName: String?,
val bio: String?
@com.google.gson.annotations.SerializedName("bio")
val bio: String?,
@com.google.gson.annotations.SerializedName("birthday")
val birthday: String? = null
)