瀏覽代碼

Create AdminAPI.UserView to avoid compile-time dep

Speeds up recompilation
cycles-ensure-plug
Alex Gleason 3 年之前
父節點
當前提交
4faeec2c44
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 7211D1F99744FBB7
共有 2 個文件被更改,包括 10 次插入2 次删除
  1. +0
    -2
      lib/pleroma/web/admin_api/controllers/user_controller.ex
  2. +10
    -0
      lib/pleroma/web/admin_api/views/user_view.ex

+ 0
- 2
lib/pleroma/web/admin_api/controllers/user_controller.ex 查看文件

@@ -45,8 +45,6 @@ defmodule Pleroma.Web.AdminAPI.UserController do
when action in [:follow, :unfollow]
)

plug(:put_view, Pleroma.Web.AdminAPI.AccountView)

action_fallback(AdminAPI.FallbackController)

defdelegate open_api_operation(action), to: Pleroma.Web.ApiSpec.Admin.UserOperation


+ 10
- 0
lib/pleroma/web/admin_api/views/user_view.ex 查看文件

@@ -0,0 +1,10 @@
# Pleroma: A lightweight social networking server
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

defmodule Pleroma.Web.AdminAPI.UserView do
use Pleroma.Web, :view
alias Pleroma.Web.AdminAPI

def render(view, opts), do: AdminAPI.AccountView.render(view, opts)
end

Loading…
取消
儲存