File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -325,11 +325,11 @@ defmodule Plausible.Stats.ApiQueryParser do
325325 defp parse_include_entry ( key , _value ) ,
326326 do: { :error , % QueryError { code: :invalid_include , message: "Invalid include key'#{ i ( key ) } '." } }
327327
328- defp parse_pagination ( pagination ) when is_map ( pagination ) do
328+ def parse_pagination ( pagination ) when is_map ( pagination ) do
329329 { :ok , Map . merge ( @ default_pagination , atomize_keys ( pagination ) ) }
330330 end
331331
332- defp parse_pagination ( nil ) , do: { :ok , @ default_pagination }
332+ def parse_pagination ( nil ) , do: { :ok , @ default_pagination }
333333
334334 defp atomize_keys ( map ) when is_map ( map ) do
335335 Map . new ( map , fn { key , value } ->
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ defmodule Plausible.Stats.Dashboard.QueryParser do
2020 { :ok , dimensions } <- ApiQueryParser . parse_dimensions ( params [ "dimensions" ] ) ,
2121 { :ok , filters } <- ApiQueryParser . parse_filters ( params [ "filters" ] ) ,
2222 { :ok , metrics } <- parse_metrics ( params ) ,
23+ { :ok , order_by } <- ApiQueryParser . parse_order_by ( params [ "order_by" ] ) ,
24+ { :ok , pagination } <- ApiQueryParser . parse_pagination ( params [ "pagination" ] ) ,
2325 { :ok , include } <- parse_include ( params ) do
2426 { :ok ,
2527 ParsedQueryParams . new! ( % {
@@ -28,6 +30,8 @@ defmodule Plausible.Stats.Dashboard.QueryParser do
2830 dimensions: dimensions ,
2931 filters: filters ,
3032 metrics: metrics ,
33+ order_by: order_by ,
34+ pagination: pagination ,
3135 include: include ,
3236 skip_goal_existence_check: true ,
3337 now: Keyword . get ( opts , :now )
You can’t perform that action at this time.
0 commit comments