112batuhan / mapper-influences-backend-rs

https://www.mapperinfluences.com
0 stars 0 forks source link

make user data in beatmap fields fallback to beatmapset creator name for users that have been banned #18

Closed 112batuhan closed 4 days ago

112batuhan commented 5 days ago

If a user is banned, then we don't get any data in multi user search. And we filter out those beatmaps so we don't show them in the endpoints. We can set the avatar to guest avatar, and have the name as "banned" or smt, but that defeats the purpose.

I think best way to handle this is that we can fallback to beatmapset creator and user_id and send guest avatar in response. We can do the same in beatmap search. We can also do another pass and request the beatmap creator and get the avatar. If that's also not available, we finally send guest avatar url. After getting them all cached, the response times should be low enough anyway. There is no need for second pass for avatar url. In fact, we don't even have to store user avatars. We can make them ourselves with user id

112batuhan commented 4 days ago

done in https://github.com/112batuhan/mapper-influences-backend-rs/commit/cdb0310b4cbbc3f477b58cb89a99081a7b16b4a3