Allow submitting an array of rule_ids to /api/v1/reports
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
bbf3bc2228
commit
574db5b988
9 changed files with 102 additions and 9 deletions
|
|
@ -29,6 +29,11 @@ defmodule Pleroma.Rule do
|
|||
|> order_by(asc: :priority)
|
||||
end
|
||||
|
||||
def get(ids) when is_list(ids) do
|
||||
from(r in __MODULE__, where: r.id in ^ids)
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
def get(id), do: Repo.get(__MODULE__, id)
|
||||
|
||||
def create(params) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue