Allow to filter search by multiple tags

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-08-03 17:34:50 +02:00
parent 50666e5dd7
commit 2198b2cb87
6 changed files with 25 additions and 18 deletions

View File

@@ -3,5 +3,7 @@ defmodule Mobilizon.Service.Guards do
Various guards
"""
defguard is_nil_or_empty_string(value) when is_nil(value) or value == ""
defguard is_valid_string?(value) when is_binary(value) and value != ""
defguard is_valid_list?(value) when is_list(value) and length(value) > 0
end