调整用户删除检测接口
This commit is contained in:
parent
9954a5f92f
commit
610db14bc9
|
@ -121,7 +121,7 @@ class Api::V1::UsersController < Api::V1::BaseController
|
|||
org_ids = TeamUser.where(user_id: @observe_user.id).pluck(:organization_id) | OrganizationUser.where(user_id: @observe_user.id).pluck(:organization_id)
|
||||
org_count = Organization.where(id: org_ids).count
|
||||
project_count = Project.where(user_id: @observe_user.id).count
|
||||
render_ok({ org_count: org_count, project_count: project_count })
|
||||
render_ok({ can_delete: org_count == 0 && project_count == 0, org_count: org_count, project_count: project_count })
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue