Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85197564
fallback_controller.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
911 B
Referenced Files
None
Subscribers
None
fallback_controller.ex
View Options
# Pleroma: A lightweight social networking server
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule
Pleroma.Web.AdminAPI.FallbackController
do
use
Pleroma.Web
,
:controller
def
call
(
conn
,
{
:error
,
:not_found
})
do
conn
|>
put_status
(
:not_found
)
|>
json
(%{
error
:
dgettext
(
"errors"
,
"Not found"
)})
end
def
call
(
conn
,
{
:error
,
reason
})
do
conn
|>
put_status
(
:bad_request
)
|>
json
(%{
error
:
reason
})
end
def
call
(
conn
,
{
:errors
,
errors
})
do
conn
|>
put_status
(
:bad_request
)
|>
json
(%{
errors
:
errors
})
end
def
call
(
conn
,
{
:param_cast
,
_
})
do
conn
|>
put_status
(
:bad_request
)
|>
json
(
dgettext
(
"errors"
,
"Invalid parameters"
))
end
def
call
(
conn
,
_
)
do
conn
|>
put_status
(
:internal_server_error
)
|>
json
(%{
error
:
dgettext
(
"errors"
,
"Something went wrong"
)})
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Mon, Jun 29, 9:26 AM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1553662
Default Alt Text
fallback_controller.ex (911 B)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment