Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F162728
report_controller.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
779 B
Referenced Files
None
Subscribers
None
report_controller.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.MastodonAPI.ReportController
do
use
Pleroma.Web
,
:controller
action_fallback
(
Pleroma.Web.MastodonAPI.FallbackController
)
plug
(
Pleroma.Web.ApiSpec.CastAndValidate
)
plug
(
Pleroma.Web.Plugs.OAuthScopesPlug
,
%{
scopes
:
[
"write:reports"
]}
when
action
==
:create
)
defdelegate
open_api_operation
(
action
),
to
:
Pleroma.Web.ApiSpec.ReportOperation
@doc
"POST /api/v1/reports"
def
create
(%{
assigns
:
%{
user
:
user
},
body_params
:
params
}
=
conn
,
_
)
do
with
{
:ok
,
activity
}
<-
Pleroma.Web.CommonAPI
.
report
(
user
,
params
)
do
render
(
conn
,
"show.json"
,
activity
:
activity
)
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Fri, Feb 21, 5:44 PM (13 h, 11 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
66806
Default Alt Text
report_controller.ex (779 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment