Rename param

This commit is contained in:
Brahim Hadriche 2023-12-08 07:38:32 -05:00
parent 58f66761fb
commit 3a84359e7d

View File

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