mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-22 04:35:45 +08:00
add: project members api and update forks api
This commit is contained in:
6
app/controllers/projects/members_controller.rb
Normal file
6
app/controllers/projects/members_controller.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class Projects::MembersController < Projects::BaseController
|
||||
def index
|
||||
users = @project.all_collaborators.like(params[:search]).includes(:user_extension)
|
||||
@users = kaminari_paginate(users)
|
||||
end
|
||||
end
|
||||
4
app/views/projects/members/index.json.jbuilder
Normal file
4
app/views/projects/members/index.json.jbuilder
Normal file
@@ -0,0 +1,4 @@
|
||||
json.total_count @users.total_count
|
||||
json.users do
|
||||
json.partial! 'users/user_small', users: @users
|
||||
end
|
||||
Reference in New Issue
Block a user