OpenAPI: MastodonAPI Media Controller
This commit is contained in:
parent
989cda6509
commit
2bfd727a71
@ -105,6 +105,7 @@ defmodule Pleroma.Web.ApiSpec.MediaOperation do
|
|||||||
responses: %{
|
responses: %{
|
||||||
200 => Operation.response("Media", "application/json", Attachment),
|
200 => Operation.response("Media", "application/json", Attachment),
|
||||||
401 => Operation.response("Media", "application/json", ApiError),
|
401 => Operation.response("Media", "application/json", ApiError),
|
||||||
|
403 => Operation.response("Media", "application/json", ApiError),
|
||||||
422 => Operation.response("Media", "application/json", ApiError)
|
422 => Operation.response("Media", "application/json", ApiError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ defmodule Pleroma.Web.MastodonAPI.MediaControllerTest do
|
|||||||
|
|
||||||
conn
|
conn
|
||||||
|> get("/api/v1/media/#{object.id}")
|
|> get("/api/v1/media/#{object.id}")
|
||||||
|> json_response(403)
|
|> json_response_and_validate_schema(403)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user