projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Filter out internal users by default
[akkoma]
/
lib
/
pleroma
/
report_note.ex
diff --git
a/lib/pleroma/report_note.ex
b/lib/pleroma/report_note.ex
index 91102696be05c77588dd5878e78017908c9c7240..a239bd3614cfa10b78b804551e9fd56916502f48 100644
(file)
--- a/
lib/pleroma/report_note.ex
+++ b/
lib/pleroma/report_note.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ReportNote do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.ReportNote do
@@
-38,9
+38,11
@@
defmodule Pleroma.ReportNote do
|> Repo.insert()
end
|> Repo.insert()
end
- def get_all_for_status(status_id) do
- ReportNote
- |> where(activity_id: ^status_id)
- |> Repo.all()
+ @spec destroy(FlakeId.Ecto.CompatType.t()) ::
+ {:ok, ReportNote.t()} | {:error, Changeset.t()}
+ def destroy(id) do
+ from(r in ReportNote, where: r.id == ^id)
+ |> Repo.one()
+ |> Repo.delete()
end
end
end
end