mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-16 17:55:56 +08:00
后台组织管理
This commit is contained in:
23
app/controllers/admins/organizations_controller.rb
Normal file
23
app/controllers/admins/organizations_controller.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
class Admins::OrganizationsController < Admins::BaseController
|
||||
before_action :finder_org, except: [:index]
|
||||
|
||||
def index
|
||||
@orgs = paginate Organization.all
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
def destroy
|
||||
@org.destroy!
|
||||
Admins::DeleteOrganizationService.call(@org.login)
|
||||
render_delete_success
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def finder_org
|
||||
@org = Organization.find(params[:id])
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user