mirror of
https://gitlab.com/foxixus/neomovies-api.git
synced 2025-10-28 01:48:51 +05:00
feat: Add id_type parameter support for movies and TV shows
This commit is contained in:
@@ -54,8 +54,9 @@ func (h *TVHandler) GetByID(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
language := GetLanguage(r)
|
||||
idType := r.URL.Query().Get("id_type") // kp or tmdb
|
||||
|
||||
tvShow, err := h.tvService.GetByID(id, language)
|
||||
tvShow, err := h.tvService.GetByID(id, language, idType)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user