Admin API: Allow changing the state of multiple reports at once
This commit is contained in:
parent
795ea5dfc2
commit
8dcc2f9f5e
7 changed files with 142 additions and 27 deletions
|
|
@ -346,6 +346,13 @@ defmodule Pleroma.Web.CommonAPI do
|
|||
end
|
||||
end
|
||||
|
||||
def update_report_state(activity_ids, state) when is_list(activity_ids) do
|
||||
case Utils.update_report_state(activity_ids, state) do
|
||||
:ok -> {:ok, activity_ids}
|
||||
_ -> {:error, dgettext("errors", "Could not update state")}
|
||||
end
|
||||
end
|
||||
|
||||
def update_report_state(activity_id, state) do
|
||||
with %Activity{} = activity <- Activity.get_by_id(activity_id) do
|
||||
Utils.update_report_state(activity, state)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue