refactor: backend-only transpose, remove client-side transpose logic

This commit is contained in:
2026-07-11 22:30:59 +02:00
parent 381f273f10
commit af328deac1
5 changed files with 27 additions and 53 deletions

View File

@@ -29,6 +29,7 @@ pub struct UpdateSongRequest {
#[derive(Deserialize, ToSchema, IntoParams)]
pub struct GetSongQuery {
pub apply_capo: Option<bool>,
pub transpose: Option<i8>,
}
#[derive(Deserialize, ToSchema)]

View File

@@ -155,6 +155,13 @@ pub async fn get_song(
song
};
let song = match params.transpose {
Some(semitones) if semitones != 0 => {
ChordTransposer.transpose_song(&song, semitones)
}
_ => song,
};
Ok(Json(song))
}