Rename param

This commit is contained in:
Brahim Hadriche 2023-12-08 07:38:32 -05:00
parent 58f66761fb
commit 3a84359e7d
1 changed files with 2 additions and 2 deletions

View File

@ -153,8 +153,8 @@ module Invidious::Routes::API::V1::Authenticated
env.response.content_type = "application/json"
user = env.get("user").as(User)
sorted = env.params.query["sorted"]?.try &.== "true"
if sorted
sort = env.params.query["sort"]?.try &.== "last"
if sort
subscriptions = Invidious::Database::Channels.select_sorted(user.subscriptions)
else
subscriptions = Invidious::Database::Channels.select(user.subscriptions)