From 3c1d99037ce4c0b7ced30fceb1cf79a4ea9e5db8 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 26 May 2026 21:04:23 -0400 Subject: [PATCH] =?UTF-8?q?fix(android):=20MeApi=20=E2=80=94=20move=20requ?= =?UTF-8?q?est=20bodies=20inline=20(project=20pattern)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a1b1eed moved the body data classes out of MyProfileWire.kt but the MeApi.kt write didn't land (stale Read), so MeApi was still trying to import them from models.wire where they no longer exist. Inline them in MeApi.kt matching the AdminUsersApi / PlaylistsApi / QuarantineApi pattern (where request bodies live alongside the interface). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../minstrel/api/endpoints/MeApi.kt | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/com/fabledsword/minstrel/api/endpoints/MeApi.kt b/android/app/src/main/java/com/fabledsword/minstrel/api/endpoints/MeApi.kt index 6781ef2b..9a70291f 100644 --- a/android/app/src/main/java/com/fabledsword/minstrel/api/endpoints/MeApi.kt +++ b/android/app/src/main/java/com/fabledsword/minstrel/api/endpoints/MeApi.kt @@ -1,8 +1,8 @@ package com.fabledsword.minstrel.api.endpoints -import com.fabledsword.minstrel.models.wire.ChangePasswordRequest import com.fabledsword.minstrel.models.wire.MyProfileWire -import com.fabledsword.minstrel.models.wire.UpdateProfileRequest +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable import retrofit2.http.Body import retrofit2.http.GET import retrofit2.http.PUT @@ -34,3 +34,23 @@ interface MeApi { @PUT("api/me/password") suspend fun changePassword(@Body body: ChangePasswordRequest) } + +/** + * Body for `PUT /api/me/profile`. Pass only the fields you want to + * change; the server merges — empty strings clear, nulls leave + * existing values alone. + */ +@Serializable +data class UpdateProfileRequest( + @SerialName("display_name") val displayName: String? = null, + val email: String? = null, +) + +/** + * Body for `PUT /api/me/password`. Both fields required. + */ +@Serializable +data class ChangePasswordRequest( + @SerialName("current_password") val currentPassword: String, + @SerialName("new_password") val newPassword: String, +)