Dynamically fix `get_radio_radio_track`

environments/review-front-wvff-cfe5gn/deployments/13838
wvffle 2022-09-25 16:31:26 +00:00 zatwierdzone przez Georg Krause
rodzic 8a620dbab8
commit bfc8d742b0
1 zmienionych plików z 3 dodań i 7 usunięć

Wyświetl plik

@ -47,16 +47,12 @@ class CustomAutoSchema(AutoSchema):
if len(tokenized_path) > 0 and model_singular == tokenized_path[0]:
tokenized_path.pop(0)
# rename `get_radio_radio_track` to `get_radio_track`
if (
len(tokenized_path) > 1
and tokenized_path[0] == "radio"
and tokenized_path[1] == "radio"
):
# rename `get_radio_radio_track` to `get_radio_track`. Works with all models
if len(tokenized_path) > 1 and tokenized_path[0] == tokenized_path[1]:
tokenized_path.pop(0)
# rename `get_manage_channel` to `admin_get_channel`
elif len(tokenized_path) > 0 and tokenized_path[0] == "manage":
if len(tokenized_path) > 0 and tokenized_path[0] == "manage":
tokenized_path.pop(0)
# rename `get_manage_library_album` to `admin_get_album`