mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-28 01:48:51 +05:00
Problem:
- MultiSearch endpoint was reading 'language' parameter only
- Frontend sends 'lang' parameter (from interceptor)
- Search results were always in Russian
Solution:
- Replace manual language parameter reading with GetLanguage(r)
- GetLanguage checks both 'lang' and 'language' parameters
- Defaults to 'ru-RU' if not specified
- Converts 'en' to 'en-US' and 'ru' to 'ru-RU' for TMDB
Before:
language := r.URL.Query().Get("language")
if language == "" {
language = "ru-RU"
}
After:
language := GetLanguage(r)
Result:
✅ Search results now respect ?lang=en parameter
✅ Movie/TV titles in search are localized
✅ Consistent with other endpoints (movies, tv, etc.)
14 MiB
Executable File
14 MiB
Executable File
The file is too large to be shown.
View Raw