music(ui): 简化只留「和弦谱」一个抓取 tab,简谱/字母版废弃
deploy music / build-and-deploy (push) Successful in 1m54s

This commit is contained in:
Fam Zheng
2026-05-10 21:32:49 +01:00
parent e5f3a95aa9
commit 5674be1cfd
3 changed files with 34 additions and 48 deletions
+2 -9
View File
@@ -1549,17 +1549,10 @@ async fn upload_attachments(
) -> Result<JsonResp<Value>, AppError> {
let role = match q.role.as_deref().map(str::trim).filter(|s| !s.is_empty()) {
None => None,
Some(r)
if matches!(
r,
"chord" | "chord_letters" | "chord_functional" | "numbered" | "staff"
) =>
{
Some(r.to_string())
}
Some(r) if matches!(r, "chord" | "jianpu" | "numbered" | "staff") => Some(r.to_string()),
Some(other) => {
return Err(AppError::bad_request(format!(
"unsupported role '{other}', expect one of: chord / chord_letters / chord_functional / numbered / staff"
"unsupported role '{other}', expect one of: chord / jianpu / numbered / staff"
)));
}
};