mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew
synced 2026-08-26 15:02:18 +08:00
Add client side header check for if client supports custom songs
This commit is contained in:
@@ -65,9 +65,10 @@ async fn user(req: HttpRequest) -> impl Responder {
|
||||
|
||||
user["lottery_list"] = array![];
|
||||
|
||||
// Custom songs visible to this user are unlocked
|
||||
for id in crate::router::custom_song::get_music_ids(user["user"]["id"].as_i64().unwrap()).members() {
|
||||
user["master_music_ids"].push(id.as_i64().unwrap()).unwrap();
|
||||
if crate::router::custom_song::client_supports_custom_songs(&req) {
|
||||
for id in crate::router::custom_song::get_music_ids(user["user"]["id"].as_i64().unwrap()).members() {
|
||||
user["master_music_ids"].push(id.as_i64().unwrap()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
global::api(&req, Some(user))
|
||||
|
||||
Reference in New Issue
Block a user