Merge branch 'feature/reports-groups-and-multiple-state-update' into 'develop'
Admin API: Grouped reports, update multiple reports in one query Closes admin-fe#43 See merge request pleroma/pleroma!1815
This commit is contained in:
commit
1afeaf82fa
11 changed files with 605 additions and 133 deletions
|
|
@ -370,6 +370,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