Skip to content

Commit

Permalink
Updates type spec based on current CMS API capabilities
Browse files Browse the repository at this point in the history
- restricts `:sidebar` value to either `0` for false or `1` for true
- `:date` now requires a nested `:value` and can no longer be a string
  • Loading branch information
amaisano committed Jan 9, 2020
1 parent 57f3415 commit 0b56495
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions apps/cms/lib/repo.ex
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,15 @@ defmodule CMS.Repo do
"""

@type teaser_filters :: %{
optional(:sidebar) => integer,
optional(:sidebar) => 0 | 1,
optional(:type) => [API.type()],
optional(:type_op) => String.t(),
optional(:related_to) => integer,
optional(:except) => integer,
optional(:only) => integer,
optional(:items_per_page) => 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 20 | 50,
optional(:date_op) => String.t(),
optional(:date) =>
String.t() | [value: String.t()] | [min: String.t(), max: String.t()],
optional(:date) => [value: String.t()] | [min: String.t(), max: String.t()],
optional(:sort_order) => :DESC | :ASC,
optional(:sort_by) => String.t()
}
Expand Down

0 comments on commit 0b56495

Please sign in to comment.