Update OpenAPI spec for AdminAPI.StatusController
authorEgor Kislitsyn <egor@kislitsyn.com>
Tue, 2 Jun 2020 15:07:17 +0000 (19:07 +0400)
committerEgor Kislitsyn <egor@kislitsyn.com>
Tue, 2 Jun 2020 15:08:09 +0000 (19:08 +0400)
lib/pleroma/web/admin_api/controllers/status_controller.ex
lib/pleroma/web/api_spec/operations/admin/status_operation.ex

index c91fbc771ce25b0f9ddccb233043a6adc8c6c8ff..574196be855f06233f10ae2ef753204150965be3 100644 (file)
@@ -41,9 +41,7 @@ defmodule Pleroma.Web.AdminAPI.StatusController do
 
   def show(conn, %{id: id}) do
     with %Activity{} = activity <- Activity.get_by_id(id) do
-      conn
-      |> put_view(Pleroma.Web.AdminAPI.StatusView)
-      |> render("show.json", %{activity: activity})
+      render(conn, "show.json", %{activity: activity})
     else
       nil -> {:error, :not_found}
     end
index 0b138dc797e7ab1ffeed5578d4ae4bd883479f3e..2947e6b34926cd2150b0fc5c1dd43343e4f346a3 100644 (file)
@@ -74,7 +74,7 @@ defmodule Pleroma.Web.ApiSpec.Admin.StatusOperation do
       parameters: [id_param()],
       security: [%{"oAuth" => ["read:statuses"]}],
       responses: %{
-        200 => Operation.response("Status", "application/json", Status),
+        200 => Operation.response("Status", "application/json", status()),
         404 => Operation.response("Not Found", "application/json", ApiError)
       }
     }