diff options
author | feld <feld@feld.me> | 2019-11-14 13:35:41 +0000 |
---|---|---|
committer | feld <feld@feld.me> | 2019-11-14 13:35:41 +0000 |
commit | 1afeaf82fa3f1718233f5012f851912f87f35a88 (patch) | |
tree | 8d0e6b91d34edc574cf18c9188eaadf2e69443b4 /lib/pleroma/web/common_api/common_api.ex | |
parent | 574369b42dd7b62e41c3a4429e4e66b9a9b3483d (diff) | |
parent | 46787b9fe1c61d5139198187a0d2013f1a2e5162 (diff) | |
download | pleroma-1afeaf82fa3f1718233f5012f851912f87f35a88.tar.gz |
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
Diffstat (limited to 'lib/pleroma/web/common_api/common_api.ex')
-rw-r--r-- | lib/pleroma/web/common_api/common_api.ex | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex index f1937b1ec..fe6e26a90 100644 --- a/lib/pleroma/web/common_api/common_api.ex +++ b/lib/pleroma/web/common_api/common_api.ex @@ -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) |